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?

5
  • 2
    What do you get from sudo netstat -apn |grep -w 1194? – MadHatter Nov 14 '13 at 8:56
  • udp 0 0 172.16.0.5:1194 0.0.0.0:* 6788/openvpn – Milos Nov 14 '13 at 8:59
  • Are you sure it's closed? OpenVPN doesn't respond unless the packet is valid, so even if it gets through the firewall the scan may not get a reply. Have you tried with an OpenVPN client? – ptman Nov 14 '13 at 9:09
  • I have tryed to run telnet to the specific port and I got a timeout. Maybe this is the problem, I will ask a colleague to try with a OpenVPN client. – Milos Nov 14 '13 at 9:11
  • 2
    Telnet is tcp . – dmourati Nov 14 '13 at 9:12
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
3
  • 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 9:19
  • Had to look up your grep -w ... – dmourati Nov 14 '13 at 9: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 9:50

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.