At the moment I just have a masquerading firewall
but I'm hoping to add a shell script containing ipchains rules onto it
soon. At the moment the script defines variables at the beginning and uses them
later. ie.
#!/bin/sh
EXTERNAL_INTERFACE="eth0"
IP_ADDR="192.168.1.20"
ipchains -A input $EXTERNAL_INTERFACE -s $IP_ADDR etc.etc.
Although there is a problem.
I've got a dynamically assigned IP address, so in
theory I'd have to re-configure the script every time PPP was started. Is there
and environment variable in BASH to do the job $IP_ADDR or something like that,
but then how does it know which? eth0 or ppp0? I feel I'm going to have to write
a more cunning piece of script for this one. Any
ideas?