There are several computers, hoping to use one of them as the server and provide routing and sharing services for other computers. to ensure stability and security, choose linux as the server system, ubuntu is a very easy-to-use Linux release, which I will use. First of all, the hardware must have a computer that can install Ubuntu7.04 (generally not all new computers can be installed), and there are two NICs as gateways for two network segments. The installation configuration is directly installed with Ubuntu7.04. The installation is successful and will soon be complete. However
There are several computers, hoping to use one of them as the server and provide routing and sharing services for other computers. to ensure stability and security, choose linux as the server system, ubuntu is a very easy-to-use Linux release, which I will use.
Hardware
First of all, you must have a computer that can be installed with Ubuntu7.04 (not all new computers can be installed), and two NICs are available as gateways for two network segments.
Install configurations
Install Ubuntu7.04 directly. The installation was successful and soon completed. Then configure the network and set the network adapter eth0 to 192.168.1.234, because the original network segment is 192.168.1.0/24, and the other network adapter eth1 is configured as the gateway 192.168.2.1 with the network segment 192.168.2.0/24, in this way, all other computers are clients in the LAN 192.168.2.0/24.
Use the route-n command to view the route table information:
Kernel IP route table
Target gateway subnet mask flag hop reference Interface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
One is the gateway of 192.168.1.0/24, the other is the gateway of 192.168.2.0/24, the other is the loop, and the last is the default route.
Next, IP Forwarding. In many documents, use the following command to enable I forwarding:
Sudo echo "1">/proc/sys/net/ipv4/ip_forward
But I don't know why I always say I have no operation permission in Ubuntu, so I have to look for another path:
Modify/etc/sysctl. conf and add:
Net. ipv4.ip _ forward = 1
Also added:
Net. ipv4.tcp _ syncookies = 1
Net. ipv4.icmp _ echo_ignore_broadcasts = 1
This configuration sets system parameters when the system starts, so that IP Forwarding is complete.
The firewall management tool FireStarter is installed, but the following error occurs when it is started:
The device eth0 is not ready
An error occurred while starting. Run the following command:
Udo sed-I ~ "S/\/sbin \/ifconfig/env LANG = en_US \/sbin \/ifconfig/g"/etc/firestarter. sh