The lab's mainframe has finally windows2003 upgraded to ubuntu14.04. As for why the use of Tp-link routers, such as the processing power of the PC is higher than the processing power of tp-link, more reason is to want to customize a router, more flexible, such as configuration port mapping and so on.
1. Configure a router with dual NICs
(1) Dial-eth0
You can use a dial-up script, but now that the Linux comes with a dialer that already supports 802.1x, unlike Windows, which requires additional dialer, the 127 lab login password is: 00127125; Linux host username: 108lab, Both the password and root user password are 123
(2) Configure LAN network card information--eth1
Just started to use ifconfig dead and alive no eth1 information, and then run to the official website download driver, the result driver support to 2.6.11 kernel,,, finally reboot under the good ...
Use the command line ifconfig eth1 192.168.1.2 netmask 255.255.255.0 to configure the network card, without configuring the gateway.
(3) Open Ip_forward, transparent forwarding
Echo 1 >/proc/sys/net/ipv4/ip_forward
Then use the command to have the kernel take effect immediately:
Sysctl-p
In order to turn on the Ip_forward, in/etc/sysctl.conf find ip_forward that line, uncomment can be.
(4) Set NAT, the source IP of the packet that the LAN goes out to be converted to the router's external network IP
Iptables-t nat-a postrouting-o eth0-s 192.168.1.0/24-j Masquerade
(5) Add the above script to the startup script, so that the Internet can be switched on
Ifconfig eth1 192.168.1.2 netmask 255.255.255.0iptables-t nat-a postrouing-o eth0-s 192.168.1.0/24-j Masquerade
Linux dual NIC configuration Lab router