Operating System: Linux/Debian
Network Access to China Telecom ADSL fixed IP Address
Two NICs are: eth0 (Egress) eth1 (connected to vswitch)
Eth0: Public Network 220.172.238.241
Eth1: 192.168.0.1
Iptables
Iptables-T Nat-A postrouting-O eth0-j snat -- to-source 220.172.238.241
DHCP starts
1) apt-Get install DHCP
2) configure the/etc/DHCPD. conf file as follows:
Option domain-name "fugue.com ";
Option domain-name-servers 202.98.192.68;
Option subnet-mask limit 255.0;
Default-lease-time 600;
Max-lease-time 7200;
# The other subnet that shares this physical network
Subnet 192.168.0.0 netmask 255.255.255.0 {
Range dynamic-BOOTP 192.168.0.30 192.168.0.254;
Option broadcast-address 192.168.0.255;
Option routers 192.168.0.1;
}
3) Personal Experience: for a single network card, you can directly/etc/init. d/DHCP restart
However, for dual NICs, You have to specify the input interface. Here, all Nat requests come from eth1 (haha, because eth1 is connected to the switch.
So execute/usr/sbin/DHCPD eth1