5

I installed openVPN on my server. By default, the port 1194 is choosen.

The problem is that when I am running:

sudo nmap -sU localhost -p 1194

It shows me:

PORT     STATE  SERVICE
1194/udp closed openvpn

I was trying to:

 sudo /sbin/iptables -I INPUT -p udp -m udp --dport 1194 -j ACCEPT

By running

sudo netstat -uapn | grep openvpn

I am getting:

 udp        0      0 172.16.0.5:1194         0.0.0.0:*                           6788/openvpn

But nothing changed. Any idea?

030
  • 5,901
  • 13
  • 68
  • 110
Milos Cuculovic
  • 423
  • 3
  • 8
  • 22

1 Answers1

9

Change your nmap to 172.16.0.5 instead of localhost or change the --local option on the openvpn command line or config. By default, openvpn should listen on all interfaces for udp/1194.

Running:

nmap -sU localhost -p 1194

could result in:

Starting Nmap 5.21 ( http://nmap.org ) at 2013-11-14 04:14 EST
Nmap scan report for localhost (127.0.0.1)
Host is up.
PORT     STATE         SERVICE
1194/udp open|filtered unknown
030
  • 5,901
  • 13
  • 68
  • 110
dmourati
  • 25,540
  • 2
  • 42
  • 72
  • I think you've hit it, because we know from his `netstat` output above that it's only listening on the `172.16.0.5` address. – MadHatter Nov 14 '13 at 09:19
  • Had to look up your grep -w ... – dmourati Nov 14 '13 at 09:20
  • @dmourati if a random port is choosen it always result in `filtered unknown` even when the firewall is closed. To check whether openvpn is accessible it should return `filtered openvpn`. Stopping it and running nmap again results in `1194/udp closed openvpn` – 030 Nov 29 '16 at 09:50