Linux · 2010-05-27

telnet: Unable to connect to remote host: Cannot assign requested address

telnet报错,无论telnet什么域名或者IP的端口:
telnet: Unable to connect to remote host: Cannot assign requested address

root@debian:~# telnet xxx.com 21
Trying xxx.com...
telnet: Unable to connect to remote host: Cannot assign requested address

添加local_port_range
echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf
sysctl -p

root@debian:~# telnet xxx.com 21
Trying x.x.x.x...
Connected to xxx.com.
Escape character is '^]'.
220 Microsoft FTP Service