{"id":424,"date":"2009-12-18T06:26:07","date_gmt":"2009-12-18T10:26:07","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=424"},"modified":"2013-03-30T06:49:49","modified_gmt":"2013-03-30T10:49:49","slug":"how-to-change-the-ftp-port","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/how-to-change-the-ftp-port","title":{"rendered":"Howto: Change the FTP port to a non-standard port?"},"content":{"rendered":"<p>If you are looking to change the Ftp port on your server from 21 to a non-standard port say 2121, you need tweak the &#8216;bind&#8217; option in the Ftp configuration file.\u00a0 On a cPanel server with pure-ftp as a Ftp server, you need to edit the <span style=\"color: #0000ff;\"><strong>pure-ftpd.conf<\/strong><\/span><strong><\/strong> file<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong># pico \/etc\/pure-ftpd.conf<\/strong><\/span><\/p><\/blockquote>\n<p>Search for the line:<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong># Bind 127.0.0.1,21<\/strong><\/span><\/p><\/blockquote>\n<p>and add the following line below it<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>Bind *,2121<\/strong><\/span><\/p><\/blockquote>\n<p>where, 2121 is the new port you want the Ftp server to listen to.<\/p>\n<p>Save the Ftp configuration and restart the ftp service.<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong># service pure-ftpd restart<\/strong><\/span><\/p><\/blockquote>\n<p>Using the netstat command you can check if the new port is in &#8216;LISTEN&#8217; state<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong># netstat -al | grep 2121<\/strong><\/span><\/p><\/blockquote>\n<p><strong>If your server is behind a firewall, you will have to open the new Ftp port in the allowed list.<\/strong> For example, if you have CSF firewall installed on your server, edit the configuration at<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong># pico \/etc\/csf\/csf.conf<\/strong><\/span><\/p><\/blockquote>\n<p>and replace port 21 with 2121 in the TCP_IN. Save the file and restart the csf firewall<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong># csf -r<\/strong><\/span><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>If you are looking to change the Ftp port on your server from 21 to a non-standard port say 2121, you need tweak the &#8216;bind&#8217; option in the Ftp configuration file.\u00a0 On a cPanel server with pure-ftp as a Ftp server, you need to edit the pure-ftpd.conf file<br \/>\n# pico \/etc\/pure-ftpd.conf<br \/>\nSearch for the line:<br \/>\n# Bind 127.0.0.1,21<br \/>\nand add the following line below it<br \/>\nBind *,2121<br \/>\nwhere, 2121 is the new port you want the Ftp server to listen to.<br \/>\nSave the Ftp configuration and restart the ftp service.<br \/>\n# service pure-ftpd restart<br \/>\nUsing the netstat [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[572,571,774,773,575,570,574,775],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/424"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=424"}],"version-history":[{"count":5,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/424\/revisions"}],"predecessor-version":[{"id":426,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/424\/revisions\/426"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}