The implementation of routes in red-flag Linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. To:
1. Install dual NICs. We recommend that you use the RTL8139 series for Nic chips, because red-flag Linux 2.0 provides better support for these chips. I use the Hongqi Linux2.5 Advanced Server version. The intranet card is eth1 and the IP address is 172.16.10.1/24.
The Internet card is eth0 and the IP address is 192.168.1.68/24.
2. Install the red-flag Linux 2.5 system.
(1) it is best to use the image installation method (default mode). It is troublesome to use character and expert mode.
(2) it is more convenient to select Custom partitions for the hard disk. First, determine the swap partition (swap). The size is generally twice the physical memory (for example, the server memory is 64 MB, swap partition is 128 MB ). It is also necessary to determine the primary partition (the basis of the entire system. The rest of the partitions can be determined based on the situation or not.
(3) install the rest as prompted.
3. Create an ip. start file in the/etc directory. The content of the file is as follows: (the description is in Chinese, and you do not need to enter :)-p)
#! /Bin/sh
# Setup IP Masquerading rules (set I P camouflage rules)
Echo 1>/proc/sys/net/ipv4/ip_forward
Depmod-
/Sbin/modprobe ip_masq_ftp
/Sbin/modprobe ip_masq_irc
/Sbin/modprobe ip_masq_portfw
/Sbin/modprobe ip_masq_user
/Sbin/modprobe ip_masq_autofw
/Sbin/modprobe ip_masq_quake
/Sbin/modprobe ip_masq_vdolive
/Sbin/modprobe ip_masq_cuseeme
/Sbin/modprobe ip_masq_mfw
Ipchains-p forward DENY
# Starting IP masquerading (set I P disguise)
Ipchains-A forward-s 192.168.1.0/255.255.255.0-j MASQ
The uppercase and lowercase letters in this file are different. You can refer to the relevant materials for their meanings. This file can only contain the following three lines:
Echo 1> proc/sys/net/ipv4/ip_forword
Depmod-
Ipchains-A forward-s 192.168.1.0/255.255.255.0-j MASQ
4. Grant executable rights to the file owner
# Chmod u + x/etc/ip. start
5. Enable the computer to automatically load the ip. start file at startup
# Vi/etc/rc. d/rc. local
Add
/Etc/ip. start
Save the disk and restart the computer.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.