Status message

The page you requested does not exist. A search for openvpn on a privileged port with an unprivileged user resulted in this page.

OpenVPN on a privileged port with an unprivileged user

Remember: if you are using a privileged port for your openvpn (<1024, like 53/udp for bypassing captive portals), don't configure privilege dropping, otherwise after the first timeout, the vpn will die with "TCP/UDP: Socket bind failed on local address [undef]:port: Permission denied"

My static key server config (/etc/openvpn/ogre.conf):

dev tun
ifconfig 10.0.66.1 10.0.66.2
secret static.key
comp-lzo
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
# keep commented if using a privileged port
#user nobody
port 53
proto udp

The logfile of the failing openvpn:

Feb 28 09:48:37 ogre ovpn-ogre[6383]: OpenVPN 2.1_rc11 i486-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Sep 18 2008
Feb 28 09:48:37 ogre ovpn-ogre[6383]: /usr/sbin/openvpn-vulnkey -q static.key
Feb 28 09:48:38 ogre ovpn-ogre[6383]: LZO compression initialized
Feb 28 09:48:38 ogre ovpn-ogre[6383]: TUN/TAP device tun0 opened
Feb 28 09:48:38 ogre ovpn-ogre[6383]: /sbin/ifconfig tun0 10.0.66.1 pointopoint 10.0.66.2 mtu 1500
Feb 28 09:48:38 ogre ovpn-ogre[6388]: UID set to nobody
Feb 28 09:48:38 ogre ovpn-ogre[6388]: UDPv4 link local (bound): [undef]:53
Feb 28 09:48:38 ogre ovpn-ogre[6388]: UDPv4 link remote: [undef]
Feb 28 09:48:47 ogre ovpn-ogre[6388]: Peer Connection Initiated with 79.47.206.122:62799
Feb 28 09:48:47 ogre ovpn-ogre[6388]: Initialization Sequence Completed
Feb 28 11:28:25 ogre ovpn-ogre[6388]: read UDPv4 [EHOSTUNREACH]: No route to host (code=113)
Feb 28 11:28:34 ogre ovpn-ogre[6388]: Inactivity timeout (--ping-restart), restarting
Feb 28 11:28:34 ogre ovpn-ogre[6388]: SIGUSR1[soft,ping-restart] received, process restarting
Feb 28 11:28:36 ogre ovpn-ogre[6388]: Re-using pre-shared static key
Feb 28 11:28:36 ogre ovpn-ogre[6388]: LZO compression initialized
Feb 28 11:28:36 ogre ovpn-ogre[6388]: TCP/UDP: Socket bind failed on local address [undef]:53: Permission denied
Feb 28 11:28:36 ogre ovpn-ogre[6388]: Exiting

Add new comment

Via Twitter

  • Fing - Network scanner for Android https://t.co/ukIdHHqK 1 day 7 hours ago
  • @manuelmazzuola io stavo per provare redis, ma ho un sonno che schianto e vo a letto :P lunedì si prova 1 day 22 hours ago
  • Symfony CMF as a CMS replacement for developers #phpday http://t.co/RsUTvcR3 2 days 4 hours ago
  • @rosamammoli tutti entusiasti, è un peccato fermarsi qui solo per oggi #phpday 2 days 5 hours ago
  • The room is full on track 3 for continuous deployment security on http://t.co/MOAyi4U9 #phpday 2 days 6 hours ago

Blog written by Giovanni Toraldo and licensed under CC-BY-SA

This blog is anonymously available via:
tor and tor2web.

Powered by Drupal
ipv6 test
WORLD IPV6 LAUNCH is 6 June 2012 – The Future is Forever