Changing the default output IP

If you want to change the outgoing IP address of your server use the following command.

Execute this command

The output should look something like this.

If no ‘src’ listed in ‘ip’ output for default route, then main IP on the interface is used for an outgoing connections. You can change it using:

Now when you execute

You should see something like this

VERY IMPORTANT
Be sure of the ip address you enter here as you will make your server unreachable if you get it wrong.

Be the first to comment

Leave a Reply

Your email address will not be published.


*