This is an old revision of the document!
# cat /etc/hosts
127.0.0.1 localhost #192.168.X.1 gate.corpX.un gate #192.168.X.10 server.corpX.un server #192.168.X.30 client1.corpX.un client1 #192.168.100+X.10 lan.corpX.un lan 172.16.1.254 proxy 172.16.1.254 rep
# cat /etc/resolv.conf
search corpX.un nameserver 172.16.1.254
root@localhost:~# cat /etc/hostname
gate.corpX.un
root@localhost:~# cat /etc/network/interfaces
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.X.1 netmask 255.255.255.0 auto eth1 iface eth1 inet static address 172.16.1.X netmask 255.255.255.0 gateway 172.16.1.254
root@localhost:~# cat /etc/sysctl.conf
... net.ipv4.ip_forward = 1 ...
root@localhost:~# init 6 ... root@gate:~# apt-get update
root@localhost:~# cat /etc/hostname
server.corpX.un
root@localhost:~# cat /etc/network/interfaces
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.X.10 netmask 255.255.255.0 gateway 192.168.X.1
root@localhost:~# init 6 ... root@server:~# apt-get update
# cat /etc/rc.conf
hostname="gate.corpX.un" ifconfig_em0="192.168.X.1/24" ifconfig_em1="172.16.1.X/24" defaultrouter=172.16.1.254 gateway_enable=yes keyrate="fast" sshd_enable=yes
# init 6
# cat /etc/rc.conf
hostname="server.corpX.un" ifconfig_em0="192.168.X.10/24" defaultrouter=192.168.X.1 keyrate="fast" sshd_enable=yes
# init 6
cat gate.sh
rm /etc/udev/rules.d/70-persistent-net.rules cat > /etc/hosts <<EOF 127.0.0.1 localhost 192.168.${1}.1 gate.corp${1}.un gate 172.16.1.254 proxy 172.16.1.254 rep EOF cat > /etc/resolv.conf <<EOF search corp${1}.un nameserver 172.16.1.254 EOF echo gate.corp${1}.un > /etc/hostname cat > /etc/network/interfaces <<EOF auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.${1}.1 netmask 255.255.255.0 auto eth1 iface eth1 inet static address 172.16.1.${1} netmask 255.255.255.0 gateway 172.16.1.254 EOF echo net.ipv4.ip_forward = 1 >> /etc/sysctl.conf