In linux, PPPOE dial-up Internet sharing-Linux general technology-Linux technology and application information. For more information, see the following. 1. Nic configuration.
Two NICs, eth0 is the dial-up Nic, IP: 192.168.1.1 (other addresses are also available), eth1 is the Intranet Nic, IP: 192.168.0.1. The mask is 255.255.255.0. The lan cidr block is 192.168.0.0.
Note: Neither network card can be configured with a gateway.
2. PPPoE software upgrade and Installation
1) download in http://www.roaringpenguin.com/pppoe/#download
4. Remove the ipchains module and select only the iptables method as follows:
1) setup
2) Select system service
3) Remove ipchains
4) Select iptables
5) restart the machine
5. PPPoE client Configuration
After installing the rp-pppoe-3.5-1.i386.rpm, you can configure the PPPoE client. The process is as follows.
#/Usr/sbin/adsl-setup
>>> Enter your PPPoE user name: -- Enter the user name of the dial-up account.
>>> 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 ethn, where n is a number. (default eth0): -- enter eth0
>>> Enter the demand value (default no): -- Enter no
>>> Enter the DNS information here: -- Enter 210.52.149.2 (depending on the IP address of the local carrier's DNS server)
>>> Please enter your PPPoE password: -- enter the Netcom User password
>>> Choose a type of firewall (0-2): -- enter 0
>>> Accept these settings and adjust configuration files (y/n )? -- Input y
6. Start the dial-up connection
/Usr/sbin/adsl-start
After successful connection, the screen displays Connected.
Now, this linux instance can be browsed online.
7. IP camouflage
To enable other machines in the LAN to share the Internet via a Linux server, at least the following command must be executed:
Iptables-t nat-a postrouting-o ppp0-j MASQUERADE
Then, the PC in the 192.168.0.0 CIDR Block (the gateway is 192.168.0.1) can access the Internet through Linux!
8. Auto Start
To enable automatic dialing on a Linux server, perform the following steps.
1) chkconfig -- add adsl
2) setup
3) Select system services
4) Select ADSL
5) OK to exit
6) Open/etc/rc. d/rc. local and add the following statement at the end of the file.
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.