Linux Ubuntu: Changing gateway address and flush/restart network interface

sudo route ip route add <ip range> gw <gateway ip address> dev <interface> sudo ip addr flush dev <interface> sudo /etc/init.d/networking restart #Ex: route ip route add 192.168.32.0/24 gw 192.168.32.1 dev eth0 sudo ip addr flush dev eth0 sudo /etc/init.d/networking restart

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.