0

I am looking to open the openvpn service on my CentOS VM. When I run nmap -sU localhost -p 1194, the following is output:

Starting Nmap 6.40 ( http://nmap.org ) at 2016-01-08 13:23 GMT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000039s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT     STATE  SERVICE
1194/udp closed openvpn

Nmap done: 1 IP address (1 host up) scanned in 0.03 seconds

How would I open this? I have already run the command sudo /sbin/iptables -I INPUT -p udp -m udp --dport 1194 -j ACCEPT and it doesn't work.

When I run netstat -an|grep 1194, nothing appears.

3
  • Can you confirm that you have proto udp in the relevant server .conf file, and that openvpn is running? What does netstat -an|grep 1194 say? (Please paste any output into your question.)
    – MadHatter
    Jan 8, 2016 at 13:49
  • I have pasted this into the question
    – peterbonar
    Jan 8, 2016 at 14:07
  • OK, the evidence is strong that, if OpenVPN is running, it's not running on the normal port. What makes you think it's running at all?
    – MadHatter
    Jan 8, 2016 at 14:43

1 Answer 1

1

Having openvpn bind to localhost:1194 doesn't really make much sense unless you're doing something you haven't told us about, as it's not like you can connect to it from anywhere useful but still...

Unless you have specified otherwise by using the local directive then the documentation suggests that it should bind to all available IP addresses so you could try nmaping the others.

Alternatively you can use ps to see if you have any openvpn processes running, if not check your logs after/during an attempt to start them (service openvpn start | systemctl start openvpn).

If your processes are running then check what interfaces they are listening on,

netstat -tulp | grep openvpn

...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .