Not able to ping second IP address on new VPS
Hi,
I can not ping my second IP address on my new VPS. I believe the problem is that the return packets are being dropped at my router because the source address is wrong, meaning ping packets to IP number 2 return with IP number 1 source address. I can ping IP number 1 address without any problems. I have not confirmed this theory with tcpdump. The local routing table on my VPS confirms that the source address is the same for both my external IP address. Things I have tried. I have changed policy setting on FORWARD chain to ACCEPT on my VPS firewall. I have turned IP forwarding on in sysctl.conf My interface file manually sets up my interfaces; eth0 IP number 1 mask gateway dns-servers etho IP number 2 mask Command ip addr shows eth0 has both IP addresses assigned and IP number 2 is secondary. ip route shows default route to gateway. I manually deleted the automatically created route to the network defined by mask. I confirmed that rp_filter is turned off in /proc and sysctl.conf I have setup another routing table so that I can set up a second default route for the packets sourced from the second IP address. The table creation worked and the rule creation worked, but when I try to create the second default route in the new table I get and error stating the network is unreachable. I didn't really think setting up a second IP was going to be so hard. I have exhausted all my ideas for now and would really appreciate some advice ... |
I have an update.
I recreated the route (that I deleted) to the network defined by the mask and I was able to create the new default route with the IP address number 2 as the source in the new table I created. But, unfortunately I am still unable to ping the IP number 2 address from outside my server. Any advice is welcome ... |
Here are some details on my VPS setup.
First IP address 1.2.3.4 is working, meaning I can ping this address from remote location. Second IP addresss 1.2.3.5 is not working, meaning I get this ping error "Destination Host Unreachable". Code:
user@host:~$ sudo iptables -vnL |
OK, problem solved.
The VPS needed to be shutdown and then restarted, apparently a simple reboot is not the same. The shutdown must reset something on the back-end ... |
All times are GMT -5. The time now is 10:18 PM. |