Bridged VPN and DHCP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • x-yuri
    Junior Member
    • Apr 2024
    • 4

    Bridged VPN and DHCP

    I'm trying to launch OpenVPN on GCP in bridged mode. According to the bridging howto I'm supposed to provide:

    Code:
    server-bridge 192.168.8.4 255.255.255.0 192.168.8.128 192.168.8.254
    where 192.168.8.0/24 is the main NIC's network. But AFAICT the IPs in my case (on GCP) are provided by DHCP. And this case doesn't seem to be covered by the howto's. According to the man page:

    > If --server-bridge is used without any parameters, it will enable a DHCP-proxy mode, where connecting OpenVPN clients will receive an IP address for their TAP adapter from the DHCP server running on the OpenVPN server-side LAN. Note that only clients that support the binding of a DHCP client with the TAP adapter (such as Windows) can support this mode.

    As such I decided to go with server-bridge without parameters. But when I run OpenVPN locally, it says:

    Code:
    2024-04-16 08:51:35 OpenVPN ROUTE: OpenVPN needs a gateway parameter for a --route option and no default was specified by either --route-gateway or --ifconfig options
    2024-04-16 08:51:35 OpenVPN ROUTE: failed to parse/resolve route for host/network: 10.255.255.224
    And I'm not sure what I'm missing here. server-bridge should push "route-gateway dhcp". It looks like it wants me to let OpenVPN assign the IP addresses, but it was pretty hard to replace the main NIC with a bridge, and I'm not sure if this can be handled without DHCP.

    More details here.
Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎