Just some links, notes, photos, quotes, and stuffs.

Permanently Add Static Route in Ubuntu

1. Create a file named "static-routes" or something similar in /etc/networks/if-up.d directory.

sudo vi /etc/networks/if-up.d/static-routes

2. Add routing command(s) into the file.

#!/bin/sh
 
/sbin/route del -net default gw 10.102.74.1 netmask 0.0.0.0 dev eth0
/sbin/route add -net 10.0.0.0 gw 10.102.74.1 netmask 255.0.0.0 dev eth0

3. Make the file executable.

sudo chmod +x /etc/networks/if-up.d/static-routes

4. Reboot the system.