[Openswan Users] problem to start xl2tpd -- init_network: Unable to bind socket: Address already in use. Terminating.
Erick Chinchilla Berrocal
erick at netcrc.net
Tue Dec 28 09:35:09 EST 2010
Paul
Thanks for your reply
# lsof -i udp:1701
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
xl2tpd 2845 root 3u IPv4 6047 UDP lab-01.test.com:l2f
My comments, the VPN Connection is not working
When check the IP's with the NMAP, get this
NMAP
# nmap 11.11.11.11 (Public IP) (Eth0)
Starting Nmap 4.62 ( http://nmap.org ) at 2010-12-28 07:58 CST
Interesting ports on 11.11.11.11
Not shown: 1712 closed ports
PORT STATE SERVICE
22/tcp open ssh
53/tcp open domain
3000/tcp open ppp
Nmap done: 1 IP address (1 host up) scanned in 0.115 seconds
#nmap 192.168.192.11 (LAN) (Eth1)
Starting Nmap 4.62 ( http://nmap.org ) at 2010-12-28 07:58 CST
Interesting ports on 192.168.192.11:
Not shown: 1712 closed ports
PORT STATE SERVICE
22/tcp open ssh
53/tcp open domain
3000/tcp open ppp
Nmap done: 1 IP address (1 host up) scanned in 0.205 seconds
#Firewall - IPtables
ACCEPT udp -- any any anywhere anywhere
udp dpt:l2f
ACCEPT tcp -- any any anywhere anywhere
tcp dpt:l2f
ACCEPT udp -- any any anywhere anywhere
udp dpt:isakmp
ACCEPT udp -- any any anywhere anywhere
udp dpt:4500
ACCEPT esp -- any any anywhere anywhere
ACCEPT ah -- any any anywhere anywhere
#Setup
# /etc/ipsec.conf
nat_traversal=yes
virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12
nhelpers=0
include /etc/ipsec.d/l2tp-psk.conf
# /etc/ipsec.d/l2tp-psk.conf
conn L2TP-PSK-NAT
rightsubnet=vhost:%priv
also=L2TP-PSK
conn L2TP-PSK
authby=secret
pfs=no
rekey=no
keyingtries=3
left=11.11.11.11 (Public IP) (Eth0)
leftnexthop=%defaultroute
leftprotoport=17/1701
right=%any
rightprotoport=17/0
type=transport
auto=add
# /etc/ipsec.secrets
11.11.11.11 %any: "vpn-test"
# /etc/xl2tpd/xl2tpd.conf
[global]
listen-addr = 11.11.11.11 (Public IP) (Eth0)
auth file = /etc/xl2tpd/l2tp-secrets
debug network = yes
debug packet = yes
debug state = yes
debug tunnel = yes
[lns default
ip range = 192.168.192.22-192.168.192.29
local ip = 192.168.192.21
require chap = yes
refuse pap = yes
require authentication = yes
name = vpn-test-01
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
# /etc/ppp/options.xl2tpd
ipcp-accept-local
ipcp-accept-remote
ms-dns 192.168.192.11
noccp
auth
crtscts
idle 1800
mtu 1410
mru 1410
nodefaultroute
debug
lock
proxyarp
connect-delay 5000
# /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses
test * test *
#VPN Setup - Windows7
--> network and sharing center --> set up a new connection --> connect a
workplace (VPN) --> next --> user my Internet (VPN) --> Internet Address
(11.111.11.11) / Destination name (test-vpn) --> next --> user (test) /
password (test) (/etc/ppp/chap-secrets ) --> connect --> skip
--> VPN Connection Properties-->Security-->Type of VPN--> Layer2
(L2TP/IPSec)-->Advanced setting-->use pheshared key for authentication-->
(key) vpn-test (/etc/ipsec.secrets)-->ok
#xl2tpd -D
xl2tpd[2874]: init_network: Unable to bind socket: Address already in use.
Terminating.
#/etc/init.d/ipsec status
IPsec running - pluto pid: 2225
pluto pid 2225
No tunnels up
# ipsec verify
Checking your system to see if IPsec got installed and started correctly:
Version check and ipsec on-path [OK]
Linux Openswan U2.4.12/K2.6.26-2-686 (netkey)
Checking for IPsec support in kernel [OK]
NETKEY detected, testing for disabled ICMP send_redirects [OK]
NETKEY detected, testing for disabled ICMP accept_redirects [OK]
Checking for RSA private key (/etc/ipsec.secrets) [DISABLED]
ipsec showhostkey: no default key in "/etc/ipsec.secrets"
Checking that pluto is running [OK]
Two or more interfaces found, checking IP forwarding [OK]
Checking NAT and MASQUERADEing [N/A]
Checking for 'ip' command [OK]
Checking for 'iptables' command [OK]
Opportunistic Encryption Support [DISABLED]
#/var/log/syslog
Dec 28 08:18:58 lab-01 xl2tpd[2758]: setsockopt recvref: Protocol not
available
Dec 28 08:18:58 lab-01 kernel: [ 27.791036] PPP generic driver version
2.4.2
Dec 28 08:18:58 lab-01 kernel: [ 27.802498] NET: Registered protocol
family 24
Dec 28 08:18:59 lab-01 xl2tpd[2758]: L2TP kernel support not detected.
Dec 28 08:18:59 lab-01 xl2tpd[2785]: xl2tpd version xl2tpd-1.2.0 started on
netcrc-mia-01 PID:2785
Dec 28 08:18:59 lab-01 xl2tpd[2785]: Written by Mark Spencer, Copyright (C)
1998, Adtran, Inc.
Dec 28 08:18:59 lab-01 xl2tpd[2785]: Forked by Scott Balmos and David Stipp,
(C) 2001
Dec 28 08:18:59 lab-01 xl2tpd[2785]: Inherited by Jeff McAdams, (C) 2002
Dec 28 08:18:59 lab-01 xl2tpd[2785]: Forked again by Xelerance
(www.xelerance.com) (C) 2006
Dec 28 08:18:59 lab-01 xl2tpd[2785]: Listening on IP address 11.11.11.11,
port 1701
# Debian = 5.0.7
#Kernel = 2.6.26-2-686
Best Regards
Erick Ch.
-----Original Message-----
From: Paul Wouters [mailto:paul at xelerance.com]
Sent: Monday, December 27, 2010 5:38 PM
To: Erick Chinchilla Berrocal
Cc: users at openswan.org
Subject: Re: [Openswan Users] problem to start xl2tpd -- init_network:
Unable to bind socket: Address already in use. Terminating.
On Mon, 27 Dec 2010, Erick Chinchilla Berrocal wrote:
> when i try to start my xl2tpd services its return this error
>
> # xl2tpd -D
>
> xl2tpd[2972]: init_network: Unable to bind socket: Address already in use.
Terminating.
There is already one running? At least something is listening on port 1701
already.
check with: lsof -i udp:1701
Paul
More information about the Users
mailing list