wiki:VPN

Version 2 (modified by krit, 4 years ago) (diff)

--

VPN

pptp-client

  1. Set up pptp-client, we need to edit 2 files with content as following
    [root@mini peers]# pwd
    /etc/ppp/peers
    [root@mini peers]# cat apricot
    # written by pptpsetup
    pty "pptp 188.16x.xx9.x39 --nolaunchpppd"
    lock
    noauth
    nobsdcomp
    nodeflate
    name tonic9
    remotename apricot
    ipparam apricot
    require-mppe-128
    
  1. Since we use name=tonic9, we need to add user tonic9 in /etc/ppp/chap-secrets'
    [root@mini peers]# grep tonic9 /etc/ppp/chap-secrets
    tonic9          apricot         "tonic@dmin"    *
    [root@mini peers]# 
    

xl2tp-server

On server, we need

  1. config xl2tp
    [root@Bluefin xl2tpd]# tail -15 /etc/xl2tpd/xl2tpd.conf
    
    [global]
    port = 1701
    access control = no
    
    [lns default]
    ;ip range = 10.90.100.240-10.90.100.250
    ;local ip = 10.90.100.254
    ip range = 10.50.30.1-10.50.30.200 
    local ip = 10.50.30.254
    require authentication = yes
    name = LinuxVPN
    pppoptfile = /etc/ppp/options.xl2tp
    
    [root@Bluefin xl2tpd]# 
    
  1. Put following content in /etc/ppp/options.xl2tp
    [root@Bluefin ppp]# pwd
    /etc/ppp
    [root@Bluefin ppp]# cat options.xl2tp 
    noccp
    auth
    mtu 1410
    mru 1410
    nodefaultroute
    proxyarp
    silent
    debug
    ms-dns 8.8.4.4
    
    [root@Bluefin ppp]#