Skip to content

Adding routes in linux

19/10/2012

The following command will allow all ips on the subnet 1.1.1.0

/sbin/route add -net 1.1.1.0 netmask 255.255.255.0 gw 192.168.1.254

Don’t forget to add it to the sysconfig files to make it persistent.

vi /etc/sysconfig/network-scripts/route-ethX

Where X is the ethernet interface you were using.

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: