Left Up Right PPP-Protokoll

PPP-Dial-In FAQ

d.h. "PPP-Server FAQ"
1.) PPP-Grundeinstellungen: Was ist sinnvoll ?
2.) Welche zwei Möglichkeiten gibt es. PPP serverseitig zu implementieren?
mit mgetty (Datei login.config)
3.) Wie kann man dem Client einen oder zwei DNS-Server-Adressen zuweisen?
Optionen:
# Specify which DNS Servers the incoming Win95 or WinNT Connection should use
# Two Servers can be remotely configured
ms-dns 192.168.1.1
ms-dns 192.168.1.2
4.) Wie kann man dem Client einen oder zwei WINS-Server-Adressen zuweisen?
Optionen:
# Specify which WINS Servers the incoming connection Win95 or WinNT should use
ms-wins 192.168.1.50
ms-wins 192.168.1.51
5.) Kann man die System-Benutzerdatenbank (/etc/passwd) zur Authentisierung eines Dial-In-Users verwenden?
Ja, Parameter "login", ferner "refuse-chap", "papcyrpt", aber Vorsicht bei PAM-Systemen
6.) bei Shadow-passwd hier der Tip von John Vozza:
Fixes to the PAM and shadow password support in pppd, from Al Longyear and others.

OLD: (john@netrom.com) pointed out that if you are running shadow passwords, you have to re-compile pppd with 'make HAS_SHADOW=1' for the 'login'" option to work.

7.) Kann man die SMB-Benutzerdatenbank (/etc/smbpasswd) zur Authentisierung eines Dial-In-Users verwenden?
Hierzu ist ein Patch erforderlich
8.) Wie implementiert man "AutoDisconnect der Verbindung nach einer definierten IdleTimeOut"
Parameter "idle 600"
9.) Wie aktiviert bzw. deaktiviert man "ProxyARP" ?
Parameter "proxyarp" bzw. "noproxyarp" In some cases it is desirable to use proxy ARP, for example on a server machine connected to a LAN, in order to allow other hosts to communicate with the remote host. The proxyarp option causes pppd to look for a network interface on the same subnet as the remote host (an inter­ face supporting broadcast and ARP, which is up and not a point-to-point or loopback interface). If found, pppd creates a permanent, published ARP entry with the IP address of the remote host and the hardware address of the network interface found.
10.) Kann man bei LINUX-PPP auch OTP-Authentisierung (One Time Password Authentisierung) verwenden?
Patch xyz siehe URL
11.) pppd und Password Expiration Notification (Paßwort-Aging-Systems)
nur in Verbindung mit RADIUS oder TACAC+ möglich.
12.) pppd und Radius-Plugin
Begriff Plugin spezifizieren
13.) pppd und PAM-Support
Ja, z.B. bei SuSE 6.4, Kernel 2.2.14 und pppd 2.3.11 gibt es /etc/pam.d/ppp
14.) Datei /etc/mgetty+sendfax/login.config bei LINUX
Achtung: Diese Datei wird bei allen asynchronen PPP-Verbindungsaufbauten durchlaufen
/AutoPPP/  -   ppp   /usr/sbin/pppd file /etc/ppp/autoppp.conf
Datei /etc/ppp/autoppp.conf
auth 
-chap 
+pap 
# papcrypt 
# require-pap
# refuse-chap
login 
modem 
crtscts 
lock 
proxyarp 
nodefaultroute 
noreplacedefaultroute 
debug 
asyncmap 20A0000 
escape FF 
ms-dns 172.16.1.61 
ms-dns 172.16.1.62 
ms-wins 172.16.1.3 
ms-wins 192.120.163.200 
# 172.16.1.65:162.16.1.66 
# remote-ip fuer Analog-PPP 
:162.16.1.66 
logfile /var/log/di.log
15.) Datei /etc/inittab bei LINUX
S1:2345:respawn:/sbin/mgetty ttyS1
oder
mo:23:respawn:/usr/sbin/mgetty -x 6 -s 38400 ttyS0
Parameterbeschreibung mgetty (Auszug Datei /etc/inittab) :
-s
setzt die zu verwendende Portgeschwindigkeit z.B.: 38400 Baud
ttyS0
definiert die anzusprechende Schnittstelle ( ttyS0 = COM1 )
-x 6
setzt den debug-Modus; die debug-Informationen werden in der Datei /tmp/log.mg. abgelegt (/tmp/log.mg.ttyS0)
dann aktivieren "telinit -q" und pruefen mittel "ps -aux|grep mgetty"
16.) Datei /etc/ppp/pap-secrets bei LINUX
dialinuser1	*	b1ab1a!?	111.222.33.44
dialinuser2	*	p8sSw0rd	111.222.33.44
In der 'mgetty'-Konfigurationsdatei /etc/mgetty+sendfax/mgetty.config wird unter anderem festgelegt, bei einer ankommenden Verbindung nur den Modem-Modus zu verwenden:
17.) Datei /etc/mgetty+sendfax/mgetty.config bei LINUX
# ----- port specific section -----
# Here you can put things that are valid only for one line, not the others
# USR Sportster Vi 28.8, connected to ttyS0: don't do fax
port ttyS0
  data-only y
  rings 2
Parameterbeschreibung Auszug Datei /etc/mgetty+sendfax/mgetty.config :
port ttyS0
Schnittstellenspezifische Definitionen fuer Port ttyS0 ( = COM1 )
data-only y
spezifiziert die Klasse des am angegebenen Port angeschlossenen Modems: keine Verwendung des FAX-Modus, nur Daten-Modus
rings
definiert die Anzahl der RING-Meldungen die abgewartet werden bis 'mgetty' ueber das Modem abhebt
18.) zeitweises Sperren des pppd
'mgetty' bietet hierfuer eine Loesung, 'login'-Prozesse zeitweise zu sperren. Durch Anlegen einer Datei namens /etc/nologin. (hier /etc/nologin/ttyS0) wird 'mgetty' gehindert, einem eingehenden Anruf selbststaendig zu antworten.
Diese Funktion muss natuerlich in den entsprechenden Anwahl-/Abwahlscripts, beim Verbindungsende/-abbruch ('pppd'-Option 'disconnect') bzw. beim Hochlauf des Systemes als Standardeinstellung (in der Datei /sbin/init.d/serial) definiert werden.

Die 'login'-Sperre wird realisiert durch ein simples touch /etc/nologin.ttyS0; chmod 666 /etc/nologin.ttyS0

Die 'login'-Sperre kann wieder aufgehoben werden durch

 rm -f /etc/nologin.ttyS0
19.) Datei /etc/modules.conf
To prevent inconsequential but annoying PPP errors when logging in, add the following to your /etc/conf.modules file (create it if it doesn't exist):
alias ppp-compress-21 bsd_comp
alias ppp-compress-24 ppp_deflate
alias ppp-compress-26 ppp_deflate 
20.) Proxy-ARP serverseitig, welche IP-Adressen werden dem Client zugewiesen?
under linux is
'arp -s <IP> <HW ADDR> pub'.
"echo "1" > /proc/sys/net/ipv4/conf/eth0/proxy_arp" 
es wird hier serverseitig mit local-ip-address und remote-ip-adress gearbeitet.
Die Angabe von local-ip-addresse ist nicht erforderlich. Alternativ kann man fuer local-ip-address den Hostname des Rechners angeben.

The 'proxyarp' option sets up (surprise) a proxy ARP entry in the PPP server's ARP table that basically says 'send all packets destined for the PPP client to me'.

This is the easiest way to set up routing to a single PPP client - but you cannot use this if you are routing between two LANs - you must add proper network routes which can't use proxy ARP.

The use of proxy ARP is useful when you have a server. It will allow the dynamic connection of remote systems without the need for the update of the routing tables on other system but the one associated as the 'server'.

Linux's networking software directly supports proxy ARP. There is no need for a special daemon process such as proxyarpd used in some systems.

21.) Proxy-ARP serverseitig, wie sieht es mit dem Routing server bzw. clientseitig aus?
serverseitig, Defaultroute bleibt; d.h. PPP-Parameter "nodefaultroute", Hostroute zum PPP-Client clientseitig, Defaultroute kann auf PPP-Interface gesetzt werden. Proxy-ARP pruefen:
# $ tcpdump -n arp
# 12:33:06.979376 arp who-has xx.xx.xx.149 tell xx.xx.xx.3
# 12:33:07.969471 arp who-has xx.xx.xx.149 tell xx.xx.xx.3
# 12:33:08.969470 arp who-has xx.xx.xx.149 tell xx.xx.xx.3
#
# 3 packets received by filter
# 0 packets dropped by kernel.
22.) Modem-Autoanswering
nach dem 3. Klingelzeichen abheben.
ATS0=3
23.) Datei /etc/syslog.conf
daemon.*;local2.*              /var/log/ppp
24.) Bidirektionale Authentisierung
PAP can (and for CHAP DOES) require bidirectional authentication - that is a valid name and secret is required on each computer for the other computer involved.
However, this is NOT the way most PPP servers offering dial-up PPP PAP-authenticated connections operate.
25.) MS-CHAP
pppd funktioniert als PPP-DialIn-Server fuer Win9x, WinNT, jedoch ist nicht MS-CHAP als Authentisierungsprotocol empfohlen; sondern CHAP-MD5 oder PAP verwenden.
26.) Routing
27.) Authentication system
28.) DNS-Eintrag für Vorwärts- und Rückwärtsauflösung (Alternativ /etc/hosts verwenden)
dettlx05
dettnbxy
 
29.) PPP und Source-/Destination-IP-Adressfilter (ACLs)
Siehe Sicherheit im Internet
30.) Win98 als PPP-Client
AutoIP deaktivieren (Reg-Skript AutoIP_off.reg verwenden)
31.) Offene Punkte:
wie ist die IP-Adressvergabe bei asyncPPP und Proxy-ARP, wenn es drei gleichzeitige Dial-In-Connections gibt, z.B. /dev/ttyS0, /dev/ttyI0 und /dev/ttyI1

Lösung: IP-Adressvergabe bei Dial-In mittels Datei /etc/ppp/options.tty Anmerkung: ein ISP-Dial-Out via pppd sollte dann nicht erfolgen.
Alternativ: Radius- oder Tacacs-Server verwenden.

32.) PPP-DialIn-Server-Security, Auditing and Accounting
Pppd now runs the /etc/ppp/auth-up script, if it exists, when the peer successfully authenticates itself, and /etc/ppp/auth-down when the connection is subsequently terminated. This can be useful for accounting purposes.
33.) Datei /etc/nsswitch.conf
hosts: files dns
34.) Datei /etc/host.conf
order hosts, bind
35.) Datei /etc/resolv.conf
domain  tt.de.ifm
search  tt.de.ifm  es.de.ifm
nameserver 172.16.1.61
nameserver 172.16.1.62
# nameserver 192.120.252.1
Also check the following in your client DUN session:
#!/bin/sh
# Establishing a PPP connection
# to a Windows NT Server under CALLBACK mode use
phone="cb 555111"
/usr/sbin/pppd 38400 connect '/usr/sbin/chat -v -f $HOME/win_nt.chat' \
    lock $phone
_______________________________________________________________________________
file: dial_win_nt.callback

To take the arrived callback correctly, a corresponding 'mgetty' 
process for the interface must be defined for this purpose through an 
entry to the file /etc/inittab. This 'mgetty' process is activated in the 
next system start and takes the 'pppd' programmes' call in an arrived PPP 
connection.
_______________________________________________________________________________
mo:23:respawn:/usr/sbin/mgetty -x 6 -s 38400 ttyS0
_______________________________________________________________________________
Exit file /etc/inittab
_______________________________________________________________________________
Parameter description exit file /etc/inittab :
-s            :   sets the port speed to be used 
                         e.g.: 38400 Baud
ttyS0                :   defines the interface to be addressed
                         ( ttyS0 = COM1 ) 
-x 6                 :   sets the debug mode. The debug informations 
                         are filed in the file /tmp/log.mg.
                         (/tmp/log.mg.ttyS0)
_______________________________________________________________________________

In the 'mgetty' configuration file /usr/etc/mgetty+sendfax/mgetty.config 
is fixed to use only the modem mode in an arrived connection.
_______________________________________________________________________________
# ----- port specific section -----
# Here you can put things that are valid only for one line, not the others
# USR Sportster Vi 28.8, connected to ttyS0: don't do fax
port ttyS0
data-only y
rings 2
_______________________________________________________________________________
Exit file /usr/etc/mgetty+sendfax/mgetty.config
_______________________________________________________________________________
Parameter description exit file /usr/etc/mgetty+sendfax/mgetty.config :
 port ttyS0           : Specific interface definitions for
                        port ttyS0 ( = COM1 )
 data-only y          : specifies the class of the modem connected to the 
                        declared port:  
                        no use from FAX mode, only data mode
 rings             : defines the RING messages' number that are 
                        waited for until 'mgetty' lifts the modem up
_______________________________________________________________________________

Informatik- und Netzwerkverein Ravensburg e.V Walter Jäger