Create pppserver on redhat9

Source: Internet
Author: User
Article Title: Create pppserver on redhat9. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The following describes how to create a ppp server on redhat9:
  
1. Connect the modem and power it on.
  
2. Modify the/etc/inittab file and add a row:
7: 2345: respawn:/sbin/mgetty-s 115200-n 1-D ttyS0
This line enables mgetty to listen to com1 when the system runtime levels are 2, 3, 4, and 5, respectively,
Set com1 to 115200 and send a response once the bell rings. It is only a Digital modem (no fax response signal will be sent ).
The number 7 at the beginning of the line is meaningless, as long as it is not repeated in the file and not greater than 100.
TtyS0 stands for com1
  
3. Confirm that mgetty's rpm package has been installed (mgetty-1.1.30-2 in redhat9 ),
Run init q to enable mgetty to start listening. Call in by phone to hear if it is a bell and then respond.
  
4. Modify the/etc/mgetty + sendfax/mgetty. config file to have the following section:
Port ttyS0
Debug 3
Speed115200
Data-only y
This section is also set to com1. You can skip this step.
  
5. confirm that the ppp rpm package is installed (ppp-2.4.1-10 in redhat9 ),
Modify the permissions of the/usr/sbin/pppd file: chmod u + s/usr/sbin/pppd, which has the s permission to execute all these identities.
  
6. Create a user ppp, set the password, and change the login script to/usr/sbin/pppd.
  
7. Create an empty/etc/ppp/options. ttyS0 file (this step can be omitted ).
  
8. Modify the/etc/ppp/options file to the following: (Multiple rows can be used)
/Dev/ttyS0 115200 asyncmap 0 crtscts defaultroute
192.168.168.1: 192.168.168.168
Netmask 255.255.255.0
Ms-dns 61.139.2.69
Proxyarp
The pppd program reads/etc/ppp/options ,~ /. Ppprc,/etc/ppp/options. ttyName file,
The content will be used as a parameter, and then the read will overwrite the same parameters read first. For the meaning of each parameter, see pppd man.
  
9. Create a New dial-up connection in windows and change the dial-up properties: display the terminal window. Then dial in. A terminal window will appear after handshaking. Please log in to it,
After login, garbled characters should appear after pppd is started. After clicking finish, a ppp connection will be established.
  
10. Modify the/etc/mgetty + sendfax/login. config file and delete the remarks in the following line:
#/AutoPPP/-a_ppp/usr/sbin/pppd auth-chap + pap login debug
This line will allow automatic login without logging in to the terminal window.
  
11. Modify the/etc/ppp/pap-secrets file and add a line:
**""*
It means to run any computer to log on from anywhere
  
12. Change the dialing attribute in windows back to the terminal window that does not display, and enter the account and password. The user and password will be automatically verified when you dial in.
  
13. In order to enable the dial-in computer to access the network, set the response in the firewall, for example:
Iptables-a input-I ppp0-j ACCEPT
Iptables-a foreard-I ppp0-j ACCEPT
Iptables-t nat-a postrouting-S 192.168.168.168-j MASQUERADE
  
Note:
1. Some modem do not work together to dial in the server's modem, because they are no problem when used as the client, but when used on the server, they will be disconnected and unable to connect.
  
2. After dial-in from windows, the subnet mask on the server side is 255.255.255.255. The subnet mask obtained by the windows client is 255.255.255.255, And the gateway is itself.
But they can communicate normally!
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.