Saturday, January 06, 2007

How I got my FTP server running

Through yum, I installed proftpd (a robust FTP server) on Fedora core 5 and it worked perfectly fine within my home Network. I wanted to expose it to the internet and so tweaked my router to allow requests for FTP ports and few passive ports (passive ports are those ports to which the client connects to when they are behind routers / firewalls). When my friend was trying to access the FTP site running on my system, his requests were getting timed out. Digging on the problem, I could see that my system was getting SYN packets and was not sending back any SYN/ACK. Puzzled on this problem, I got news that the FTP server worked fine in Windows in one of my friends system. So I logged onto Windows and the FTP server was accessible over the internet. Now I narrowed down that there was something in my Linux... any guess what would have been the issue ? It was the firewall in my Linux system that was hindering the TCP handshake and thereby blocking access to my FTP server from the Internet. I reconfigured my firewall settings and got my FTP server running. It was a good experience for me to get the FTP server running. One of the command options which I learned during this exercise was "netstat -tap" .I have used netstat with options a,l and quite other few but "netstat -tap" provides a neat high level picture of the status of the ports and the applications on these ports. Though netstat utility comes in windows XP, the "tap" option doesnt work on win environment and works sweet in Linux :)

No comments: