PPxPの方が簡単だという話ですので、そちらのほうがいいかもしれません。
#!/bin/sh # # This is part 2 of the ppp-on script. It will perform the connection # protocol for the desired connection. # exec chat -v \ TIMEOUT 60 \ ABORT '\nBUSY\r' \ ABORT '\nNO ANSWER\r' \ ABORT '\nRINGING\r\n\r\nRINGING\r' \ '' ATZ \ '' ATQ0V1X3\$N1=1 \ '' ATS7=50\&K3 \ 'OK-+++\c-OK' ATH0 \ TIMEOUT 60 \ OK ATD$TELEPHONE \ CONNECT '' #
TELEPHONE=XXXX-YYYY # The telephone number for the connection ACCOUNT=HOE-HOE # The account name for logon (as in 'George Burns') LOCAL_IP=0.0.0.0 # Local IP address if known. Dynamic = 0.0.0.0 REMOTE_IP=0.0.0.0 # Remote IP address if desired. Normally 0.0.0.0 NETMASK=255.255.255.0 # The proper netmask if needed ALER_SCRIPT=/etc/ppp/ta-on-dialer ## 使用するttyと速度の設定を行うこと exec /usr/sbin/pppd debug lock modem crtscts /dev/ttyS1 115200 \ asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \ noauth noipdefault netmask $NETMASK defaultroute \ user $ACCOUNT connect $DIALER_SCRIPT
#---------------- /etc/ppp/pap-secrets --------------------- # Secrets for authentication using PAP # client server secret IP addresses # User ID server Password IP addresses HOE-HOE "" S31-g}AW #-----------------------------------------------------------
#!/bin/sh ###外部のDNSを引くようにnamedを切替える rm -f /etc/ns/root.cache ln -s /etc/ns/root.cache.ppp /etc/ns/root.cache #kill -HUP `cat /var/run/named.pid` kill -9 `cat /var/run/named.pid` /usr/sbin/named ###masqueradeの設定を行う /sbin/ipchains -F forward #/sbin/ipchains -F input #/sbin/ipchains -F output /sbin/ipchains -A forward -j MASQ -s 192.168.1.0/24 -d 0.0.0.0/0 /sbin/ipchains -P forward DENY
#!/bin/sh ###masqueradeの設定を解除する /sbin/ipchains -F forward /sbin/ipchains -F input /sbin/ipchains -F output /sbin/ipchains -P input ACCEPT /sbin/ipchains -P output ACCEPT /sbin/ipchains -P forward ACCEPT ###外部のDNSを参照しないようにnamedを切替える rm -f /etc/ns/root.cache ln -s /etc/ns/root.cache.local /etc/ns/root.cache #kill -HUP `cat /var/run/named.pid` kill -9 `cat /var/run/named.pid` /usr/sbin/named