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

Re: Network renumbering



On Fri, 28 Sep 2001, Rodolfo J. Paiz wrote:

> Hi!

Hey
 
> I'm moving my servers to a new network (same provider), so for a while I 
> need to have two IP addresses for each server on the same interface and 
> with the same services on both. Two questions:
> 
> 1) Would I make one interface eth0 and the other eth0:0? Or, since I'm 
> using virtual interfaces, do I cease to use eth0 totally and instead use 
> eth0:0 and eth0:1? Or does it matter at all?

you can keep using eth0, and add eth0:0. Not sure it matters though.
 
> 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

no, the curly braces are not needed. try 

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

> Thanks so much...

welcome
charles





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