0

I've opened 21st port, but still can't connect to any ftp server using ftp command.

   limmy@Limmy-U:~$ ftp ftp.gnu.org
ftp: connect to address 208.118.235.20: Connection timed out
Trying 2001:4830:134:3::b...
ftp: connect: Network is unreachable

What the reason of it? Thanks

    limmy@Limmy-U:~$ sudo iptables -L
[sudo] пароль для limmy: 
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ftp

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
limmy@Limmy-U:~$ ftp ftp.gnu.org
ftp: connect to address 208.118.235.20: Connection timed out
Trying 2001:4830:134:3::b...
ftp: connect: Network is unreachable
ftp> exit
Limmy
  • 101
  • Can you ping6 ftp.gnu.org successfully? – David Foerster Nov 06 '16 at 04:46
  • No, "Network is unreachable" – Limmy Nov 06 '16 at 08:07
  • I'm voting to reopen the question because the IPv6 routing error only occurs after the timed-out yet successfully routed IPv4 connection. – David Foerster Nov 06 '16 at 12:06
  • Can you connect to other FTP servers? How did you “open” port 21? – David Foerster Nov 06 '16 at 12:07
  • sudo iptables -I INPUT -p tcp -m tcp --dport 21 -j ACCEPT – Limmy Nov 09 '16 at 15:45
  • Could you please [edit] your post, when you want to add information? Especially file or program output listings (with the help of the {} button in the editor toolbar) will be much more readable there; alternatively you can use a pastie service for longer listings and include the link of your pastie in your question. Overall it’s best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. – David Foerster Nov 09 '16 at 18:22
  • This command opens a port in the firewall for incoming connections on port 21, e. g. for an FTP server located inside the network protected by said firewall. Can you connect to other FTP servers? – David Foerster Nov 09 '16 at 18:22
  • Could you please post your whole firewall rule set, i. e. the output of sudo iptables -L? – David Foerster Nov 09 '16 at 18:28
  • no, i can't connect to any ftp output of iptables -L is added to post. Thank you. – Limmy Nov 11 '16 at 11:31
  • That doesn't make sense. There are no iptables rules in place at all. What happened to the rule that you claim to have added earlier? – David Foerster Nov 11 '16 at 12:39
  • I really don't understand why all rules dissapear after every reboot.

    Add this rule one more time,but I still have the same situation.

    – Limmy Nov 12 '16 at 09:21
  • Ehm, iptables rules aren't saved anywhere unless you write them into a rules list that is loaded at boot. – David Foerster Nov 12 '16 at 19:12

0 Answers0