Add Default Gateway to Linux - Sion IT

Add Default Gateway to Linux

ubuntu

Add a Default Gateway

The syntax is as follows:

route add default gw IP-Address Interface-Name

For example if your router IP address is 192.168.1.1 and the interface is called eth0, type the following command as the root user:

route add default gw 192.168.1.1 eth0

To check the routes configured on your system, type:

route

 

Posted on September 12, 2015 at 23:35 by simon · Permalink
In: Linux, Tech

One Response

Subscribe to comments via RSS

  1. Written by Drago
    on 9 May 2016 at 23:18
    Reply · Permalink

    Cool, thanks for this

Subscribe to comments via RSS

Leave a Reply