Tag Archives: routing

Small routing script

In recent days I was confronted with a problem regarding the routing under Linux.

The request was to add a route on a Proxy ARP server.

The Linux OS does give you the possibility to do add a route, in an “automatic mode”, in ways like:

  • add a route on the interface configuration (it will be applied only when the interface will go on-line) – for example Ubuntu and SUSE Linux
  • add a route on the network start script
  • add a route in the static-routes file
  • add a route with a script on the ifup folder on the “/sbin/ifup” (here more details: http://www.comptechdoc.org/os/linux/howlinuxworks/linux_hlsysconfig.html)

But because this was a complicated setup I was forced to use a bash script under the “/sbin/ifup”.

The script looked like this:

DMZ_INTERFACE=”eth0″               #we should have an IP address on this network –
LAN_INTERFACE_1=”eth1″          #we should have an IP address on this network –
EXTIPADDR=”″     #an dmz gateway
INTIPADDR=”″           #all the internal traffic

exit 0

I hope that this is going to help you,

Mihai out!