Moxa DA-682A-C7-W7E [28/112] Setting up a machine for incoming ppp connections

Moxa DA-682A-C0-LX [28/112] Setting up a machine for incoming ppp connections
DA-682A Linux Softrware Managing Communications
3-11
Setting up a Machine for Incoming PPP Connections
Method 1: pppd dial-in with pppd commands
This first example applies to using a modem, and requiring authorization with a username and password.
#pppd /dev/ttyM0 115200 crtscts modem 192.168.16.1:192.168.16.2 login auth
You should also add the following line to the file /etc/ppp/pap-secrets:
* * ““ *
The first star (*) lets everyone login. The second star (*) lets every host connect. The pair of double quotation
marks (““) indicates that the file /etc/passwd can be used to check the password. The last star (*) is to let
any IP connect.
The following example does not check the username and password:
moxa@Moxa:~# pppd/dev/ttyM0 115200 crtscts modem 192.168.16.1:192.168.16.2
Method 2: pppd dial-in with pppd script
Configure a dial-in script /etc/ppp/peer/dialin
# You usually need this if there is no PAP authentication
noauth
#auth
#login
# The chat script (be sure to edit that file, too!)
init “/usr/sbin/chat -v -f /etc/ppp/ppp-ttyM0.chat”
# Set up routing to go through this PPP link
defaultroute
# Default modem (you better replace this with /dev/ttySx!)
/dev/ttyM0
# Speed
115200
# Keep modem up even if connection fails
persist
crtscts
modem
192.168.16.1:192.168.16.2
debug
-detach
Configure the chat script /etc/ppp/ppp-ttyM0.chat
SAY ‘Auto Answer ON\n’
‘‘ ATS0=1
Start the pppd dial-in service.
moxa@MOXA:~# sudo pppd call dialin
ATTENTION
If you
would like to have auto dial-in service, you can launch the dial-in service in /etc/inittab with the
respawn
command
:
moxa@MOXA:~# sudo echo “p0:2345:respawn:pppd call dialin” >> /etc/inittab

Содержание

Похожие устройства