Results 1 to 2 of 2

Thread: openswan/xl2tpd preshared key vpn server

  1. #1
    Join Date
    Nov 2007
    Beans
    4

    openswan/xl2tpd preshared key vpn server

    I am trying to setup a vpn server. I have found an easy to follow guide. However I can't seem to connect. I am looking to start over. I will write a guide in the wiki once this is complete as nothing there exists of this nature. please help

    The base guide: http://rootmanager.com/ubuntu-ipsec-...s-clients.html

    My router IP is 192.168.0.1 with DHCP 192.168.0.100-253
    My Ubuntu Server 192.168.0.100

    Forward IPs to:
    192.168.0.100 500,4500 UDP (ipsec)
    192.168.0.100 1723 TCP (pptp)
    Do not forward 192.168.0.100 1701 UDP (l2tp)
    My Guide:

    Install and Configure Openswan

    sudo apt-get install openswan
    No, do not enable Opportunistic Encryption
    No, do not create a RSA public/private keypair


    sudo cp /etc/ipsec.d/examples/l2tp-psk.conf /etc/ipsec.d/l2tp-psk.conf

    sudo nano /etc/ipsec.d/l2tp-psk.conf
    Set
    Code:
    left=192.168.0.100       #External Server IP
    leftnexthop=192.168.0.1  #Gateway of Router
    nano /etc/ipsec.conf
    Code:
    include /etc/ipsec.d/l2tp-psk.conf
    nano /etc/ipsec.secrets
    Code:
    192.168.0.100 %any: "yourSharedPSK!"
    sudo /etc/init.d/ipsec restart

    Install and Configure xl2tpd
    sudo apt-get install xl2tpd

    sudo nano /etc/xl2tpd/xl2tpd.conf
    Code:
    [global]
    ipsec saref = yes
    listen-addr = 192.168.0.100
    auth file = /etc/ppp/chap-secrets
    
    [lns default]
    ip range = 192.168.0.210-192.168.0.219
    local ip = 192.168.0.100
    
    ms-dns 192.168.0.100   #ubuntu bind server
    ms-dns 8.8.8.8         #Google DNS server
    
    require-mschap-v2
    refuse chap = yes
    refuse pap = yes
    require authentication = yes
    ppp debug = yes
    pppoptfile = /etc/ppp/options.xl2tpd
    length bit = yes
    sudo cp /etc/ppp/options /etc/ppp/options.xl2tpd
    sudo nano /etc/ppp/options.xl2tpd
    Change noauth to auth.

    sudo /etc/ppp/chap-secrets
    Code:
    #client	server		secret		IP addresses
    username	l2tpd		"password"	*
    l2tpd		username	"password"	*

    Install and Configure Pptpd [Working]
    sudo apt-get install pptpd
    sudo nano /etc/pptpd.conf
    Code:
    localip 192.168.0.100
    remoteip 192.168.0.220-229
    sudo /etc/ppp/options
    Code:
    ms-dns 192.168.0.100   #ubuntu bind server
    ms-dns 8.8.8.8         #Google DNS server
    sudo /etc/ppp/chap-secrets
    Code:
    username pptpd password  *
    sudo restart pptpd

    sudo nano /etc/sysctl.conf
    Code:
    net.ipv4.conf.default.forwarding=1
    This forwards traffic to outside

    Sudo sudo arp --use-device --set 192.168.0.100 eth0 pub
    This creates the arproxy

    That's all I got. Any Help Will be great. I will edit above to show the changes as people help to contribute.
    Last edited by kingjm; January 19th, 2010 at 05:09 PM.

  2. #2
    Join Date
    Sep 2005
    Location
    Vermont
    Beans
    94
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: openswan/xl2tpd preshared key vpn server

    You say you can't seem to connect. But haven't described both sides of the connection that I can see. Or given the messages you see when a connection fails.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •