OpenVPN DHCP bridge

Need help configuring your VPN? Just post here and you'll get that help.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
barneby
OpenVpn Newbie
Posts: 4
Joined: Mon Jul 10, 2017 6:43 am

OpenVPN DHCP bridge

Post by barneby » Thu Jul 13, 2017 10:37 pm

Hello,
I'm trying to set the OpenVPN server as a bridge with a DHCP bridge.
Operating system:
  • Code: Select all

    # uname -a
    Linux vpn 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u2 (2017-06-26) x86_64 GNU/Linux
    
Network setup:
  • Code: Select all

    # ifconfig
    br0       Link encap:Ethernet  HWadr 00:0c:29:cd:f0:35
              inet adr:172.16.91.2  Všesměr:172.16.91.255 Maska:255.255.255.0
              inet6-adr: fe80::20c:29ff:fecd:f035/64 Rozsah:Linka
              AKTIVOVÁNO VŠESMĚROVÉ_VYSÍLÁNÍ BĚŽÍ MULTICAST  MTU:1500  Metrika:1
              RX packets:181104 errors:0 dropped:0 overruns:0 frame:0
              TX packets:5569 errors:0 dropped:0 overruns:0 carrier:0
              kolizí:0 délka odchozí fronty:0
              RX bytes:10639032 (10.1 MiB)  TX bytes:1136208 (1.0 MiB)
    
    eth0      Link encap:Ethernet  HWadr 00:0c:29:cd:f0:35
              AKTIVOVÁNO VŠESMĚROVÉ_VYSÍLÁNÍ BĚŽÍ MULTICAST  MTU:1500  Metrika:1
              RX packets:182526 errors:0 dropped:1493 overruns:0 frame:0
              TX packets:5646 errors:0 dropped:0 overruns:0 carrier:0
              kolizí:0 délka odchozí fronty:1000
              RX bytes:12727670 (12.1 MiB)  TX bytes:1152561 (1.0 MiB)
    
    lo        Link encap:Místní smyčka
              inet adr:127.0.0.1 Maska:255.0.0.0
              inet6-adr: ::1/128 Rozsah:Počítač
              AKTIVOVÁNO SMYČKA BĚŽÍ  MTU:65536  Metrika:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              kolizí:0 délka odchozí fronty:0
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    tap0      Link encap:Ethernet  HWadr 62:71:e7:a9:ca:28
              inet6-adr: fe80::6071:e7ff:fea9:ca28/64 Rozsah:Linka
              AKTIVOVÁNO VŠESMĚROVÉ_VYSÍLÁNÍ BĚŽÍ MULTICAST  MTU:1500  Metrika:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:162634 errors:0 dropped:0 overruns:0 carrier:0
              kolizí:0 délka odchozí fronty:100
              RX bytes:0 (0.0 B)  TX bytes:12494409 (11.9 MiB)
    
server.conf:
  • Code: Select all

    mode server
    tls-server
    port 443
    proto tcp
    proto tcp-server
    dev tap0
    script-security 2 system
    up up.sh
    down down.sh
    sndbuf 0
    rcvbuf 0
    ca ca.crt
    cert server.crt
    key server.key
    dh dh.pem
    auth SHA512
    tls-auth ta.key 0
    server-bridge
    client-to-client
    keepalive 10 120
    cipher AES-256-CBC
    comp-lzo
    user nobody
    group nogroup
    persist-key
    persist-tun
    status openvpn-status.log
    verb 3
    crl-verify crl.pem
    
Server log:
  • Code: Select all

    čec 10 08:40:43 vpn kernel: br0: port 2(tap0) entered forwarding state
    čec 10 08:40:43 vpn kernel: br0: port 2(tap0) entered forwarding state
    čec 10 08:40:43 vpn dhclient[1363]: Listening on LPF/tap0/36:7a:63:47:06:9e
    čec 10 08:40:43 vpn dhclient[1363]: Sending on   LPF/tap0/36:7a:63:47:06:9e
    čec 10 08:40:43 vpn dhclient[1363]: Sending on   Socket/fallback
    čec 10 08:40:43 vpn dhclient[1363]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 3
    čec 10 08:40:43 vpn openvpn[1357]: Listening on LPF/tap0/36:7a:63:47:06:9e
    čec 10 08:40:43 vpn openvpn[1357]: Sending on   LPF/tap0/36:7a:63:47:06:9e
    čec 10 08:40:43 vpn openvpn[1357]: Sending on   Socket/fallback
    čec 10 08:40:43 vpn openvpn[1357]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 3
    čec 10 08:40:46 vpn dhclient[1363]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 4
    čec 10 08:40:46 vpn openvpn[1357]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 4
    čec 10 08:40:50 vpn dhclient[1363]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 4
    čec 10 08:40:50 vpn openvpn[1357]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 4
    čec 10 08:40:54 vpn dhclient[1363]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 11
    čec 10 08:40:54 vpn openvpn[1357]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 11
    čec 10 08:40:58 vpn kernel: br0: port 2(tap0) entered forwarding state
    čec 10 08:41:05 vpn dhclient[1363]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 17
    čec 10 08:41:05 vpn openvpn[1357]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 17
    čec 10 08:41:22 vpn dhclient[1363]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 7
    čec 10 08:41:22 vpn openvpn[1357]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 7
    čec 10 08:41:29 vpn dhclient[1363]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 7
    čec 10 08:41:29 vpn openvpn[1357]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 7
    čec 10 08:41:36 vpn dhclient[1363]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 8
    čec 10 08:41:36 vpn openvpn[1357]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 8
    čec 10 08:41:44 vpn dhclient[1363]: No DHCPOFFERS received.
    čec 10 08:41:44 vpn dhclient[1363]: No working leases in persistent database - sleeping.
    čec 10 08:41:44 vpn openvpn[1357]: No DHCPOFFERS received.
    čec 10 08:41:44 vpn openvpn[1357]: No working leases in persistent database - sleeping.
    čec 10 08:41:44 vpn ovpn-server[1382]: GID set to nogroup
    čec 10 08:41:44 vpn ovpn-server[1382]: UID set to nobody
    čec 10 08:41:44 vpn ovpn-server[1382]: Listening for incoming TCP connection on [undef]
    čec 10 08:41:44 vpn ovpn-server[1382]: TCPv4_SERVER link local (bound): [undef]
    čec 10 08:41:44 vpn ovpn-server[1382]: TCPv4_SERVER link remote: [undef]
    čec 10 08:41:44 vpn ovpn-server[1382]: MULTI: multi_init called, r=256 v=256
    čec 10 08:41:44 vpn ovpn-server[1382]: MULTI: TCP INIT maxclients=1024 maxevents=1028
    čec 10 08:41:44 vpn ovpn-server[1382]: Initialization Sequence Completed
    čec 10 08:41:44 vpn systemd[1]: Started OpenVPN connection to server.
    
This is the error:
  • Code: Select all

    čec 10 08:41:36 vpn openvpn[1357]: DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 8
    
Do not you know where the error is?
Thank you.

Post Reply