Glam Prestige Journal

Bright entertainment trends with youth appeal.

I am trying to use pptpd to setup a VPN server. When I run the following

service pptpd restart
tail /var/log/syslog

The log contains the following error

MGR: Couldn't create host socket
createHostSocket: Address already in use

I figured out that this is related to ports. Including the following lines in /etc/services solves the error

pptp 11723/tcp
pptp 11723/udp

However, I want to use the port 1723 instead of something else. Are some other services blocking the port?

Result from netstat -ln | grep 1723:

tcp 0 0 0.0.0.0:1723 0.0.0.0:* LISTEN

1 Answer

To check if a port is already used, you can use lsof:

↳ lsof -i :1723
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
netcat 31521 mikael 3u IPv4 374307 0t0 UDP *:1723 

In the above example, I just started nc to listen for UDP connections on port 1723.

You can also get information about a process listening on a port with netstat:

↳ sudo netstat -lptun | grep ":1723"
udp 0 0 0.0.0.0:1723 0.0.0.0:* 31729/netcat

So you need to figure out what service is already using 1723 and probably consider using a different port for pptpd.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy