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:
18.104.22.168 –Main IP
Then let’s say trying to connect to a remote server, 22.214.171.124, 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 126.96.36.199 188.8.131.52 25
So this makes a connection and binds it (hence the b) to the ip 184.108.40.206, connects out to 220.127.116.11 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 18.104.22.168 22.214.171.124 25
Couldn’t bind to 126.96.36.199
188.8.131.52: Cannot assign requested address