Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    OpenVPN - TAP - OpenVPN needs a gateway parameter

    Scheduled Pinned Locked Moved OpenVPN
    3 Posts 2 Posters 22.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      baldacchino
      last edited by

      Hello,
      I am struggling in setting up a TAP bridge to my house. I have followed numerous guides but when I connect I get the following in my logs

      16 UDPv4 link remote: [AF_INET]115.70.3.240:1194
      Wed Feb 24 12:30:59 2016 [VPN Server Cert] Peer Connection Initiated with [AF_INET]115.70.3.240:1194
      Wed Feb 24 12:31:01 2016 OpenVPN ROUTE: OpenVPN needs a gateway parameter for a –route option and no default was specified by either --route-gateway or --ifconfig options
      Wed Feb 24 12:31:01 2016 OpenVPN ROUTE: failed to parse/resolve route for host/network: 10.0.0.0
      Wed Feb 24 12:31:01 2016 open_tun, tt->ipv6=0
      Wed Feb 24 12:31:01 2016 TAP-WIN32 device [Ethernet 2] opened: \.\Global{F0B90BF2-80AC-4646-BCE4-1E33084D829D}.tap
      Wed Feb 24 12:31:01 2016 Successful ARP Flush on interface [13] {F0B90BF2-80AC-4646-BCE4-1E33084D829D}
      Wed Feb 24 12:31:06 2016 NOTE: unable to redirect default gateway – VPN gateway parameter (--route-gateway or --ifconfig) is missing
      Wed Feb 24 12:31:06 2016 Initialization Sequence Completed

      My server config reads as follows
      dev ovpns1
      verb 3
      dev-type tap
      dev-node /dev/tap1
      writepid /var/run/openvpn_server1.pid
      #user nobody
      #group nobody
      script-security 3
      daemon
      keepalive 10 60
      ping-timer-rem
      persist-tun
      persist-key
      proto udp
      cipher AES-256-CBC
      auth SHA1
      up /usr/local/sbin/ovpn-linkup
      down /usr/local/sbin/ovpn-linkdown
      client-connect /usr/local/sbin/openvpn.attributes.sh
      client-disconnect /usr/local/sbin/openvpn.attributes.sh
      local 115.70.3.240
      tls-server
      mode server
      username-as-common-name
      auth-user-pass-verify "/usr/local/sbin/ovpn_auth_verify user 'Local Database' false server1" via-env
      tls-verify "/usr/local/sbin/ovpn_auth_verify tls 'VPN+Server+Cert' 1 "
      lport 1194
      management /var/etc/openvpn/server1.sock unix
      max-clients 10
      push "route 10.0.0.0 255.255.255.0"
      push "dhcp-option DNS 10.0.0.138"
      push "dhcp-option DNS 8.8.8.8"
      push "redirect-gateway def1"
      client-to-client
      ca /var/etc/openvpn/server1.ca
      cert /var/etc/openvpn/server1.cert
      key /var/etc/openvpn/server1.key
      dh /etc/dh-parameters.2048
      tls-auth /var/etc/openvpn/server1.tls-auth 0
      comp-lzo adaptive
      persist-remote-ip
      float

      My client config reads as follows
      dev tap
      persist-tun
      persist-key
      cipher AES-256-CBC
      auth SHA1
      tls-client
      client
      resolv-retry infinite
      remote 115.70.3.240 1194 udp
      lport 0
      verify-x509-name "VPN Server Cert" name
      auth-user-pass
      pkcs12 pfsense-udp-1194-baldacchino_vpn.p12
      tls-auth pfsense-udp-1194-baldacchino_vpn-tls.key 1
      ns-cert-type server
      comp-lzo adaptive

      Any help is appreciated.

      Thanks
      Shane Baldacchino

      1 Reply Last reply Reply Quote 0
      • K
        k-bull
        last edited by

        Well I finally figured it out.  I manually added "route-gateway" to the client with the ip of the gateway, and BAM! it worked

        1 Reply Last reply Reply Quote 0
        • K
          k-bull
          last edited by

          Solved

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.