2009年8月25日 星期二

L2TP VPN

L2TP VPN using rp-l2tpd

Client l2tp.conf
================================================
linux:ipkg_build # cat /etc/l2tp/l2tp.conf
# comment

# Global section (by default, we start in global mode)
global

# Load handlers
load-handler "sync-pppd.so"
load-handler "cmd.so"

# Bind address
listen-port 1701

# Configure the sync-pppd handler. You MUST have a "section sync-pppd" line
# even if you don't set any options.
section sync-pppd
#lns-pppd-opts "require-pap 10.0.0.1:10.0.0.2 lcp-echo-interval 30 lcp-echo-failure 6"
#lac-pppd-opts "user example name example noipdefault ipcp-accept-local ipcp-accept-remote lcp-echo-interval 30 lcp-echo-failure 6"
lac-pppd-opts "user works name works noipdefault ipcp-accept-local ipcp-accept-remote lcp-echo-interval 30 lcp-echo-failure 6"
這邊要注意把帳號帶下去給pppd

# Peer section
section peer
peer 192.168.15.10
#secret s3cr3t
port 1701
lac-handler sync-pppd
#lns-handler sync-pppd
hide-avps yes

section peer
peer 192.168.4.138
# No secret - no authentication
port 1701
lac-handler sync-pppd
lns-handler sync-pppd
hide-avps no

section peer
peer 192.168.1.142
# No secret - no authentication
port 1701
lac-handler sync-pppd
lns-handler sync-pppd
hide-avps no

# Configure the cmd handler. You MUST have a "section cmd" line
# even if you don't set any options.
section cmd
================================================


Server l2tpd.conf

預設的就可以了


l2tpd -f -d 255 &
l2tp-control "start-session 192.168.15.10 pppd-ptah /tmp/ppp/usr/local/sbin/pppd"

沒有留言: