If you have a host with multiple IP address on it, and you need to change witch IP address it present it with on the Internet, you can change the Default IP address, by changing the source IP address on the default route
1 |
ip route change default via 192.168.0.254 src 192.168.0.10 |
Of course the Linux host need to listen on the IP address.
You can see the changes by this command
1 |
ip route list |
1 |
default via 192.168.0.254 dev eth0 src 192.168.0.10 |