{"id":27,"date":"2017-10-08T04:53:00","date_gmt":"2017-10-08T04:53:00","guid":{"rendered":"https:\/\/linuxadmin.melberi.com\/uncategorized\/iptables-for-ftp-server"},"modified":"2017-10-08T15:25:11","modified_gmt":"2017-10-08T15:25:11","slug":"iptables-vsftpd","status":"publish","type":"post","link":"https:\/\/www.melberi.com\/linuxadmin\/iptables\/iptables-vsftpd","title":{"rendered":"iptables Configuration for FTP Server VSFTPD"},"content":{"rendered":"<p>Linux IPTables Configuration for Allow VSFTPD FTP Incoming and Outgoing Traffic on CentOS Fedora Redhat Ubuntu<\/p>\n<h3><span style=\"text-decoration: underline;\">IPTables FTP Accept<\/span><\/h3>\n<p><b>1)<\/b> Add following lines in \/etc\/modprobe.conf<\/p>\n<div><b>alias ip_conntrack ip_conntract_ftp ip_nat_ftp <\/b><\/div>\n<p>or run<\/p>\n<p><b># modprobe ip_conntrack_ftp\u00a0<\/b><br \/>\n<b>#modprobe ip_nat_ftp <\/b><\/p>\n<p><b>2)<\/b><b> Allow incoming traffic on the default Ftp port (21) <\/b><\/p>\n<p>a) run the following command in\u00a0Linux\u00a0shell<\/p>\n<p><b># iptables -A INPUT -p tcp &#8211;dport 21 -j ACCEPT<\/b><\/p>\n<p>b) or You can manually edit \/etc\/sysconfig\/iptables and add the below mentioned line<\/p>\n<p><b>-A INPUT -p tcp -m tcp &#8211;dport\u00a0 21 -j ACCEPT\u00a0<\/b><\/p>\n<p><strong>3) Save and Restart iptables<\/strong><br \/>\nsave this configuration<br \/>\n<strong># iptables-save &gt;\u00a0 \/etc\/sysconfig\/iptables<\/strong><br \/>\nor<br \/>\n<strong>#service iptables save <\/strong><\/p>\n<p><strong>#service iptables start<\/strong><\/p>\n<p>Now the FTP ports will be enabled in iptables.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux IPTables Configuration for Allow VSFTPD FTP Incoming and Outgoing Traffic on CentOS Fedora Redhat Ubuntu IPTables FTP Accept 1) Add following lines in \/etc\/modprobe.conf alias ip_conntrack ip_conntract_ftp ip_nat_ftp or&#8230; <a href=\"https:\/\/www.melberi.com\/linuxadmin\/iptables\/iptables-vsftpd\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[104,107],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts\/27"}],"collection":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/comments?post=27"}],"version-history":[{"count":4,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":478,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts\/27\/revisions\/478"}],"wp:attachment":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/media?parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/categories?post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/tags?post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}