[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Network renumbering



[snip]

> 2) I have a huge script that sets up all my firewall rules. Now I need two
> runs through the script, one for each IP address (they will offer identical
> services). Is the following syntax correct?
>
> for IPADDR in 111.111.111.111 222.222.222.222 ; do {
>          ipchains -A input -i eth0 -p tcp  -d $IPADDR -j ACCEPT
>          ipchains -A input -i eth0 -p udp  -d $IPADDR -j ACCEPT
>          ipchains -A input -i eth0 -p icmp -d $IPADDR -j ACCEPT
>          }
> done

Remove the braces, and make sure you flush the chains first if necessary.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]