RedHat is used as the proxy server for ADSL Internet sharing
Source: Internet
Author: User
RedHat is used as the ADSL shared Internet proxy server-Linux Enterprise Application-Linux server application information. The following is a detailed description. I. Operating Environment:
Machine System and configuration: key components of three machines
First: desktop, dual Nic, 8139 and 8029, operating system RedHat 8.0
Second: Toshiba notebook, PC Card. RTL-8139/8139C/8139C +, operating system RedHat 8.0
Third: desktop, 8029 Nic, Windows OS
Hub [Hub]: Tp-Link 10 M, 8 ports
ADSL, Ethernet B, non-route.
2. Nic settings are as follows:
Connect the two NICs on the first machine: connect ADSL to eth0 and connect eth1 to the HUB.
IP settings of the first ENI:
IP Address: 192.168.0.1
Mask: 255.255.255.0
Settings of the second Nic
IP Address: 192.168.0.2
Mask: 255.255.255.0
Do not set a gateway for these two NICs.
++
Second: Nic settings for Toshiba notebook
IP: 192.168.0.6
Mask: 255.255.255.0
Gateway: 192.168.0.1
DNS: Set for Telecom or the following
202.96.134.20.
202.96.168.68
++
Nic settings for the third machine
P: 192.168.0.8
Mask: 255.255.255.0
Gateway: 192.168.0.1
DNS: Set for Telecom or the following
202.96.134.20.
202.96.168.68
3. Set the ppp dialing,
1] Delete the original ppp ADSL link.
If redhat-config-network already uses the ppp ADSL connection number set by redhat-config-network, use the following command to delete it.
# Redhat-config-network
2] running with root permission on the terminal
# Adsl-setup
Go to the setup process:
Welcome to the ADSL client setup. First, I will run some checks on
Your system to make sure the PPPoE client is installed properly...
LOGIN NAME
Enter your Login Name (default root): the user Name provided by the ADSL provider, written here
INTERFACE
Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like/dev/hme0.
For Linux, it will be ethX, where X is a number.
(Default eth0): eth0, which is the first network card of the first machine on which ADSL accesses the internet.
Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
After which the link shoshould be dropped. If you want the link
Stay up permanently, enter no (two letters, lower-case .)
NOTE: Demand-activated links do not interact well with dynamic IP
Addresses. You may have some problems with demand-activated links.
Enter the demand value (default no): Click Enter here.
DNS
Please enter the IP address of your ISPs primary DNS server.
If your ISP claims that the server will provide dynamic DNS addresses,
Enter server (all lower-case) here.
If you just press enter, I will assume you know what you are
Doing and not modify your DNS setup.
Enter the DNS information here: 202.96.134.133 this is dsn, it is best to use your local telecommunications
Please enter the IP address of your ISPs secondary DNS server.
If you just press enter, I will assume there is only one DNS server.
Enter the secondary DNS server address here: 202.96.168.68 this is the second DNS, which is also sent by China Telecom.
PASSWORD
Please enter your Password: Write the Password given by the ADSL provider here
Please re-enter your Password:
USERCTRL
Please enter yes (two letters, lower-case.) if you want to allow
Normal user to start or stop DSL connection (default yes): yes
FIREWALLING
Please choose the firewall rules to use. Note that these rules are
Very basic. You are strongly encouraged to use a more sophisticated
Firewall setup; however, these will provide basic security. If you
Are running any servers on your machine, you must choose NONE and
Set up firewalling yourself. Otherwise, the firewall rules will deny
Access to all standard servers like Web, e-mail, ftp, etc. If you
Are using SSH, the rules will block outgoing SSH connections which
Allocate a privileged source port.
The firewall choices are:
0-NONE: This script will not set any firewall rules. You are responsible
For ensuring the security of your machine. You are STRONGLY
Recommended to use some kind of firewall rules.
1-STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2-MASQUERADE: Appropriate for a machine acting as an Internet gateway
For a LAN
Choose a type of firewall (0-2): 2
Start this connection at boot time
Do you want to start this connection at boot time?
Please enter no or yes (default no): yes
** Summary of what you entered **
Ethernet Interface: eth0
User name: ADSL User name
Activate-on-demand: No
Primary DNS: 202.96.134.20.
Secondary DNS: 202.96.168.68
Firewalling: MASQUERADE
User Control: yes
Accept these settings and adjust configuration files (y/n )? Y
3. Add the following to/etc/rc. d/rc. local:
Echo 1>;/proc/sys/net/ipv4/ip_forward
Iptables-t nat-a postrouting-s 192.168.0.0/24-o ppp0-j MASQUERADE
4. Restart the machine. OK.
If you think this article is too long, it is actually very simple. You just need to check the third point.
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service