Dynamic Firewall Rules
I am trying to build some dynamic firewall rules.
What I have so far is a script I can run from in the firewall script ( ./getip ) that looks like this...
ifconfig ppp0 | grep inet | cut -d "P" -f1 | cut -d ":" -f2-
I can run it like this in the firewall script..
./pppgetip > ip
and come up with this...
[root@beta rc.d]# cat ip
Now all I need to figure out is how to assign the contents of the file ..../ip to a variable in my script to use for making rules.
or just do the whole ifconfig thing and apply it to a variable that I can use to make rules.
Or is there maybe something I don't know about here that would make this whole thing unnecessary.
Someone correct me if I'm wrong, but you don't need to do this. I'm fairly new to linux (3 months or so) but I think when assigning rules using iptables, you don't assign rules to the ip, but rather the interface...I use Monmotha's firewall and it works great..
I want to do some special rules that use ip addresses.
I have so many rules that it takes 5 minutes to show them using -L
|All times are GMT -5. The time now is 01:09 PM.|