blog‎ > ‎

ubuntu add eth0 as default gateway

posted 29 Apr 2011, 03:57 by Muhammad Jazman

# route add default dev eth0

to make this command activated every time eth0 up, ... to be honest, I don't know, but my quick and dirty approach is to put a simple text in /etc/network/if-up.d/ with that command in a line ...

this file will be executed whenever ever single interfaces card being up (e.g. with ifconfig eth0 up)

muhammad@bb1:~$ cat /etc/network/if-up.d/tambah-route-ke-eth0
#!/bin/sh -e
route add default dev eth0