[ale] Linux box as a router w/DHCP

James Sumners james.sumners at gmail.com
Sat Jan 20 12:13:51 EST 2007


The Frozen Tux tutorial is the best one available in my opinion --
http://iptables-tutorial.frozentux.net/iptables-tutorial.html

It really isn't difficult, though. Instead if specifying a static
external IP, you just need to supply a variable which contains your
current external IP. I do this in my script like so:

EXTERNAL_IP=`ifconfig ${EXTERNAL_IFACE} | grep "inet addr" | cut -d \:
-f 2 | cut -d ' ' -f 1`

Maybe there are better ways of getting the IP, but that works well
enough for me.

On 1/20/07, Bob Kruger <bkruger at mindspring.com> wrote:
> All;
>
> I would like to use a Linux box as both a router and as a firewall for a small network going out to the internet.  The issue is that the IP address to the ISP varies as it is assigned via a DHCP server.  This makes static routing commands problematic.
>
> Does anyone know of a good "howto" or tutorial that addresses this and would allow for some sort of dynamic routing configuration when the IP address assigned by the ISP changes?
>
> Thanks in advance for any assistance.
>
> V/r
>
> Bob
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>


-- 
James Sumners
http://james.roomfullofmirrors.com/

"All governments suffer a recurring problem: Power attracts
pathological personalities. It is not that power corrupts but that it
is magnetic to the corruptible. Such people have a tendency to become
drunk on violence, a condition to which they are quickly addicted."

Missionaria Protectiva, Text QIV (decto)
CH:D 59



More information about the Ale mailing list