[lug] Firewall question

William Jarosko Jr. winrip at fpcc.net
Thu Jan 20 15:58:12 MST 2000


I'm working on making my ipchains rules alittle more restrictive. I know
I can define my ip address in a firewall script if it is known. However
with my isp assigning dynamic IP's I am wondering where or how to
retrieve the IP and assign it to a variable in the firewall script.

<Example>
external="ppp0"
DYIP="Dynamic IP"
any="any/0"
XWIN="6000:6063"


ipchains -A output -i $external -p tcp -y -s $DYIP -d $any $XWIN -j
REJECT
ipchains -A input -i $external -p tcp -y -d $DYIP $XWIN -j DENY

</Example>

As you can see, if the dynamic IP were in fact a static IP I would have
no problem but it's the assighing of the Dynamic IP that is throwing me
for a loop. Though buying a static IP isn't out of the question I'd just
like to figure this out.

Thanks in advance
Bill.





More information about the LUG mailing list