Question on IPTABLES
this is the first time i'm setting up a firewall using iptables and i needed help with my setup script. this is the beginning portion of what the script looks like :
INTERFACE="eth0" IPADDR=" BCASTADDR="192.168.1.255" my question was, i have a home network setup with a linksys wired router and my linux box uses a DHCP address given by the router. what entry to i put in the iptables script for IPADDR ? or how does that work thanks in advance |
You could try:
IPADDR=`/sbin/ifconfig eth0 | grep inet | awk {'print $2'} | cut -d: -f2` Or give it a fixed IP. |
This is how I dynamically get my eth0 IP address:
Code:
AWK=/bin/awk |
you could also use rules aimed on device (eth0, eth1, ppp0, etc...) instead of ip.
this work well too :) |
All times are GMT -5. The time now is 05:20 PM. |