Results 1 to 5 of 5

Thread: OpenVPN Socket Bind Failed on Local Address error

  1. #1
    Join Date
    Jul 2011
    Location
    Philippines
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Question OpenVPN Socket Bind Failed on Local Address error

    Good day Ubuntu users!

    Can anyone help me on a "socket bind failed" error on OpenVPN.
    When I was running Ubuntu Oneiric Ocelot, OpenVPN was working.
    After I did a fresh and clean install of Ubuntu Precise Pangolin, OpenVPN keeps getting this "socket bind failed" error and I have never been able to connect since my upgrade.

    Please help.

    This is my .ovpn file
    Code:
    prescilla@prescilla:~/VPN$ cat UDP-Smart.ovpn
    client
    port 8080
    proto udp
    dev tun
    
    ca /home/prescilla/VPN/voo/ca.crt
    auth-user-pass /home/prescilla/VPN/account.txt
    route-method exe
    
    remote 91.227.220.189
    dhcp-option DISABLE-NBT
    
    lport 53
    keepalive 5 60
    resolv-retry infinite
    fragment 1400
    mssfix
    comp-lzo
    cipher BF-CBC
    persist-key
    persist-tun
    verb 3
    reneg-sec 0
    redirect-gateway def1
    script-security 2
    fragment 1400
    When I start OpenVPN via terminal this is what I get.
    Code:
    prescilla@prescilla:~/VPN$ sudo openvpn UDP-Smart.ovpn
    [sudo] password for prescilla: 
    Wed May 23 02:25:36 2012 OpenVPN 2.2.1 i686-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Mar 30 2012
    Wed May 23 02:25:36 2012 WARNING: file '/home/prescilla/VPN/account.txt' is group or others accessible
    Wed May 23 02:25:36 2012 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
    Wed May 23 02:25:36 2012 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
    Wed May 23 02:25:36 2012 LZO compression initialized
    Wed May 23 02:25:36 2012 Control Channel MTU parms [ L:1546 D:138 EF:38 EB:0 ET:0 EL:0 ]
    Wed May 23 02:25:36 2012 Socket Buffers: R=[163840->131072] S=[163840->131072]
    Wed May 23 02:25:36 2012 TCP/UDP: Socket bind failed on local address [undef]: Address already in use
    Wed May 23 02:25:36 2012 Exiting

  2. #2
    Join Date
    May 2012
    Beans
    2

    Re: OpenVPN Socket Bind Failed on Local Address error

    same problem prescilla.
    hope anyone could help.

  3. #3
    Join Date
    Jul 2011
    Location
    Philippines
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: OpenVPN Socket Bind Failed on Local Address error

    I was able to fix this by killing the process that uses port 53 which is dnsmasq.
    If you haven't figure it out yet.
    Do this, open a terminal

    Code:
    netstat -plnt
    You will see that port 53 is being used and this is by dnsmasq.

    Search for the process id of dnsmasq
    Code:
    pidof dnsmasq
    Kill that process
    Code:
    kill process_id
    For example:
    kill 2568

    Then run your vpn script again.

  4. #4
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    14,219
    Distro
    Kubuntu 19.04 Disco Dingo

    Re: OpenVPN Socket Bind Failed on Local Address error

    Why would you ever want to use a privileged port like 53 for OpenVPN? Use ports above 1023. Ports below 1024 are not intended for userspace applications like OpenVPN.

    There's a reason why we have the Internet Assigned Numbers Authority.

  5. #5
    Join Date
    Jul 2011
    Location
    Philippines
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: OpenVPN Socket Bind Failed on Local Address error

    Thank you for the response but I have no idea why the vpn account I got from a friend uses port 53, it is the config file he gave me and so I use that. I can't connect with any other port. That's just how it is.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •