<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Permanent Static Route on Michael’s Domain</title><link>https://jeltsch.org/en/tags/permanent-static-route/</link><description>Recent content in Permanent Static Route on Michael’s Domain</description><generator>Hugo</generator><language>en-us</language><copyright>Copyright © 2002 - 2026 Michael Jeltsch.</copyright><lastBuildDate>Fri, 24 Jul 2026 00:18:18 +0300</lastBuildDate><atom:link href="https://jeltsch.org/en/tags/permanent-static-route/index.xml" rel="self" type="application/rss+xml"/><item><title>A permanent static route in Ubuntu Karmic Koala (9.10), Precise Pangolin (12.04) &amp; Trusty Tahr (14.04)</title><link>https://jeltsch.org/en/a_permanent_static_route_in_ubuntu/</link><pubDate>Sat, 26 Dec 2009 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/a_permanent_static_route_in_ubuntu/</guid><description>&lt;p&gt;&lt;strong&gt;Karmic Koala&lt;/strong&gt;To add a permanent static route to a Karmic Koala system with one NIC, you need to edit the/etc/network/interfaces file. The following section needs to be replaced:&lt;code&gt;# The primary network interfaceauto eth0#iface eth0 inet dhcp&lt;/code&gt;Modify as follows:&lt;code&gt;# The primary network interfaceauto eth0iface eth0 inet dhcpup route add -net 10.8.0.0 netmask 255.255.255.0 gw 192.168.0.3down route del -net 10.8.0.0 netmask 255.255.255.0 gw 192.168.0.3&lt;/code&gt;**Precise Pangolin (12.04)**With the Precise Pangolin, I did it by adding a script called add_route to /etc/network/if-up.d:&lt;code&gt;#!/bin/sh#if [ &amp;quot;$IFACE&amp;quot; = &amp;quot;eth0&amp;quot; ]; then route add -net 10.8.0.0/24 gw 192.168.0.18#fi&lt;/code&gt;I never added a corresponding script (del_route) to /etc/if-down.d, but that seems to be OK.**Trusty Tahr (14.04)**With Trusty Tahr, I was adding the route command as a line to the /etc/rc.local script:&lt;code&gt;…route add -net 192.168.1.0/24 gw 192.168.0.3exit 0&lt;/code&gt;The route command needs to be before the &amp;ldquo;exit 0&amp;rdquo; line!**MacOS X 10.8 (Mountain Lion)**And here is how it is done on MacOS X 10.8: 
 &lt;a href="http://nellen.it/blog/2012/01/permanent-static-routes-for-mac-os-x/" target="_blank" rel="noopener noreferrer nofollow"&gt;http://nellen.it/blog/2012/01/permanent-static-routes-for-mac-os-x&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
. They details of how to to it in MacOS X have changed over time; here is the way 
 &lt;a href="https://jeltsch.org/en/permanent_route_osx/"&gt;how it was done on MacOS X 10.4.7&lt;/a&gt;
.&lt;/p&gt;</description></item></channel></rss>