1

this is my problem:

enter image description here

  • I need a bridge on client1(Ubuntu server) side to get DHCP from R2 on client2 using openvpn vps server

this is my server.conf

mode server
verb 3
key /etc/openvpn/pki/private/key.key
ca /etc/openvpn/pki/ca.crt
cert /etc/openvpn/pki/issued/crt.crt
dh /etc/openvpn/pki/dh.pem
tls-auth /etc/openvpn/pki/ta.key
client-to-client
key-direction 0
persist-key
persist-tun
proto udp
port 1194
dev tap0
status /tmp/openvpn-status.log
tls-server
user nobody
group nogroup
comp-lzo
float
client-config-dir ccd
ping-timer-rem
ping-restart 60
ping 10

client1 config

client
nobind
dev tap
remote-cert-tls server
remote [openvpn public ip] udp
script-security 2
up script/up.sh
resolv-retry infinite
persist-key
persist-tun
verify-x509-name server_H1DlsGlwFlG7k4OE name
auth SHA256
auth-nocache
cipher AES-128-GCM
tls-client
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
remote-cert-tls server
verb 3

#certificates
...

script up

#!/bin/sh
# the tap interface name is passed as first argument
bridge=br0
brctl addif "$bridge" "$1"
ip link set tap0 up 

client 1 bridge config on netplan:

network:
  version: 2
  renderer: networkd
  ethernets:
      enp0s3:
          dhcp4: no
  bridges:
      br0:
          dhcp4: yes
          interfaces:
              - enp0s3

client1 iptables

iptables -A INPUT -i tap0 -j ACCEPT
iptables -A INPUT -i br0 -j ACCEPT
iptables -A FORWARD -i br0 -j ACCEPT

when client1 and client2 connects to openvpn server nothing happens, tap interface always is down without an ip

when add in server.conf

server-bridge 192.168.10.10 255.255.255.0 192.168.10.128 192.168.10.254

client1 and client2 never communicate

Please help me with these configurations to get dhcp on client2 :( :( :( :( :( :(

jhoss
  • 457
  • 3
  • 10
  • 19

0 Answers0