LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   vsftpd - Can't connect externally??? (https://www.linuxquestions.org/questions/linux-networking-3/vsftpd-cant-connect-externally-86806/)

Xgkkp 08-28-2003 08:50 PM

vsftpd - strange remote behaviour
 
So, I am relatively new to Linux, and I set up an ftp on my friends computer so I could download some of his files, It's Red hat 8 running vsftpd (I hope!)

anyway, When on his machine or logged in remotely via ssh, I can say "Ftp localhost" and it works fine, asks for my username/password and then allows me to view my files.

Now, when I came home and tried to do the same, it said :

Code:

[xgkkp@nick xgkkp]$ ftp 80.X.XXX.X
Connected to 80.X.XXX.X (80.X.X.X).
421 Service not available, remote server has closed connection
ftp>

Does anyone have a clue what is going on? He's directly connected through a cable modem, and I am through a firewall-type-thing.

Thanks a lot,

Nick

david_ross 08-29-2003 01:40 PM

Welcome to LQ.

Check to see if he has any firewalls running at his end:
iptables -L

Xgkkp 08-29-2003 02:11 PM

Code:

Chain INPUT (policy ACCEPT)
target    prot opt source              destination
RH-Lokkit-0-50-INPUT  all  --  anywhere            anywhere

Chain FORWARD (policy ACCEPT)
target    prot opt source              destination
RH-Lokkit-0-50-INPUT  all  --  anywhere            anywhere

Chain OUTPUT (policy ACCEPT)
target    prot opt source              destination

Chain RH-Lokkit-0-50-INPUT (2 references)
target    prot opt source              destination
ACCEPT    udp  --  cache2.ntli.net      anywhere          udp spt:domain dpts:1025:65535
ACCEPT    udp  --  cache1.ntli.net      anywhere          udp spt:domain dpts:1025:65535
ACCEPT    tcp  --  anywhere            anywhere          tcp dpt:ssh flags:SYN,RST,ACK/SYN
ACCEPT    udp  --  anywhere            anywhere          udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT    udp  --  anywhere            anywhere          udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT    all  --  anywhere            anywhere
REJECT    tcp  --  anywhere            anywhere          tcp dpts:0:1023 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT    tcp  --  anywhere            anywhere          tcp dpt:nfs flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT    udp  --  anywhere            anywhere          udp dpts:0:1023 reject-with icmp-port-unreachable
REJECT    udp  --  anywhere            anywhere          udp dpt:nfs reject-with icmp-port-unreachable
REJECT    tcp  --  anywhere            anywhere          tcp dpts:x11:6009 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT    tcp  --  anywhere            anywhere          tcp dpt:xfs flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable



I have no idea how to read this

david_ross 08-29-2003 02:27 PM

IT looks like you are blockign port 21 (ftp). Try running "lokkit" and change the firewall settings to allow ftp. Either that or disable the firewall (not recommended but good for testing):
iptables -F

Ideally you should make your own firewall rules instead of using lokkit as it is much more advanced yet easier to understand.

Xgkkp 08-30-2003 12:21 PM

Ahhh thanks very much, it works perfectly.

Out of curiosity, what would have been the equivalent command to manaully add an iptable rule?

david_ross 08-30-2003 12:50 PM

Something like:
iptables -A INPUT -p tcp --dport 21 -j ACCEPT


All times are GMT -5. The time now is 09:03 PM.