Check whether the required package is installed. [Root @ MASTER ~] # Rpm-qa | greprp-pppoerp-pppoe-3.5-32.1 configuration file directory under/etc/ppp [root @ MASTERppp] # lschap-secretsioptionsip-upipv6-uppeersfirewall-masqip-d...
Check whether the required package is installed.
[Root @ MASTER ~] # Rpm-qa | grep rp-pppoe
Rp-pppoe-3.5-32.1
The configuration file directory is in/etc/ppp
[Root @ MASTER ppp] # ls
Chap-secrets ioptions ip-up ipv6-up peers
Firewall-masq ip-down ip-up.ipv6to4 options pppoe-server-options
Firewall-standalone ip-down.ipv6to4 ipv6-down pap-secrets
Modify configuration file
[Root @ MASTER ppp] # vi pppoe-server-options
# PPP options for the PPPoE server
# LIC: GPL
# Require-pap
Require-chap # verification method
Login
Lcp-echo-interval 10
Lcp-echo-failure 2
Ms-dns 202.106.0.20
Ms-dns 8.8.8.8
Add user
[Root @ MASTER ppp] # vi chap-secrets
# Secrets for authentication using CHAP
# Client server secret IP addresses
####### Redhat-config-network will overwrite this part !!! (Begin )##########
####### Redhat-config-network will overwrite this part !!! (End )############
Zhaoyun *
Enable ip forwarding
Echo 1>/proc/sys/net/ipv4/ip_forward
Or modify/etc/sysctl. conf.
[Root @ MASTER ~] # Sysctl-p
Net. ipv4.ip _ forward = 1
Configure iptables
[Root @ MASTER ppp] # iptables-t nat-a postrouting-s 192.168.1.0/255.255.255.255-o eth1-j MASQUERADE
Eth1 is the egress NIC, which can be connected to the Internet.
Start pppoe service
[Root @ MASTER ppp] # pppoe-server-I eth0-L 192.168.1.151-R 192.168.1.2-N 20
I: specify the port for responding to the PPPOE request. Currently, eth0 is used, that is, the intranet port.
L: IP address of the PPPOE server, which can be seen during client connection
R: this is the starting address of the address pool allocated to the client. In this example, it starts from 192.168.1.2.
N: the number of IP addresses in the address pool increases by several. In this example, add 10, that is, from 192.168.1.2.
Configuration of 20 IP addresses
Now this pppoe server can work.
Find a client and establish a dial-up connection
You can see that the connection has been established.
Online test
Create a webpage.
This article is from the "technical exchange" blog