Hi,
I have two vps, vps1 and vps2. vps1 needs to connect to vps2 thru port 2222 to exchange some data. So what I did in vps2 was, to run the following command:
iptables -A INPUT -p tcp -i eth0 --dport 2222 -j ACCEPT iptables -A INPUT -p udp -i eth0 --dport 2222 -j ACCEPT
I have also tried: iptables -A INPUT -p udp --dport 2222 -j ACCEPT iptables -A INPUT -p tcp --dport 2222 -j ACCEPT iptables -A OUTPUT -p tcp --dport 2222 -j ACCEPT iptables -A OUTPUT -p udp --dport 2222 -j ACCEPT service iptables save service iptables restart
but when I use vps1 to do: telnet vps2ipaddress 2222
I got the connection refused problem.
also tried to stop the iptables on vps2 then run the telnet command on vps1, no luck