Using Telnet on a Secondary IP Address

In order to test to see if a remote server was blocking the main IP of a server, I had to try to make a manual connection from the secondary IP. It wasn’t exactly obvious to me on how to do that so I just wanted to put this out there so it may help someone else as well.

So let’s say my server has 3 different public IP addresses: –Main IP

Then let’s say trying to connect to a remote server,, on port 25 to send mail, but it doesn’t respond to ping, telnet, or even a traceroute. By default the connection would come out of the main IP of the server, but to test the connection from the other IP’s run:

telnet -b 25

So this makes a connection and binds it (hence the b) to the ip, connects out to on port 25. If it works that means that the other server could just be blocking the main ip. If that doesn’t work there could still be other issues, possibly a firewall issue on my server’s end like port 25 not being open for outgoing.

If you try to bind to an ip not on your server, it gives an error:

telnet -b 25
Couldn’t bind to Cannot assign requested address


Add Comment