search by tags

for the user

adventures into the land of the command line

linux networking

checking routes

$ route

add a new static, non persistant route (will be lost after a host reboot)

$ route add -net netmask gw metric 0 dev eth0

this will add this route

Destination  Gateway       Genmask         Flags Metric Ref Use Iface UG    0      0   0   eth0

add a new static, persistent route (will remain after a host reboot)

$ vim /etc/sysconfig/network-scripts/route-eth0

add in the route such as via dev eth0

to apply the persistent route, you need to restart the network on the host

$ sudo /sbin/service network restart

sometimes its necessary to disable iptables

$ sudo /sbin/service iptables save
$ sudo /sbin/service iptables stop
$ chkconfig iptables off

in red hat, you can disable the firewall application as the root user

$ system-config-firewall-tui

press space to disable then save and exit

$ sudo /sbin/service iptables status
$ sudo /sbin/service ip6tables status

saving firewall rules to /etc/sysconfig/iptables

$ sudo /sbin/service iptables save