Hello,
I configured an OpenVPN in mode bridge and I can connect to it but I can't see the machines on the server side.
In details :
My server is on the network (call it site A) 192.168.0.0/24 with the IP 192.168.0.66.
I have a test machine on the site A with the IP 192.168.0.50 that respond to the ping of the server.
My client is on another network (call it site B) 192.168.43.0/24 with a IP fixed by dhcp.
Here are my server.conf :
port 1338
proto udp
dev tap
# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel if you
# have more than one.
# Non-Windows systems usually don't need this.
;dev-node MyTap
# script used to add the tap interface to the bridge
# windows servers comment this out
#up up.sh
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh2048.pem
ifconfig-pool-persist ipp.txt
# addresses from .100 to .200 are reserved for VPN clients.
# Obviously, they should not be used by real LAN clients.
server-bridge 192.168.10.66 255.255.255.0 192.168.10.100 192.168.10.200
# la directive suivante permet de pousser la route qui permettra
# aux clients de joindre le réseau qui sera derrière notre passerelle
# push "route @réseau mask"
#push "route 192.168.0.0 255.255.255.0"
# les clients ayant de forte chance de se trouver sur un réseau proposant
# le service dhcp, nous devons bypasser ce dernier via la directive suivante
#push "redirect-gateway def1 bypass-dhcp"
# Certain Windows-specific network settings
# can be pushed to clients, such as DNS
# or WINS server addresses. CAVEAT:
# http://openvpn.net/faq.html#dhcpcaveats
;push "dhcp-option DNS 192.168.111.1"
;push "dhcp-option WINS 192.168.111.2"
# can clients see each other? (regardless of firewalling on the server)
;client-to-client
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
Here is my bridge-start script :
#!/bin/bash
# On créer un tunnel persistant en mode TAP.
openvpn --mktun --dev tap0
# On créer une nouvelle interface de type "bridge".
brctl addbr br0
# On ajoute l’interface du réseau DMZ et l’interface virtuelle TAP dans le bridge.
brctl addif br0 tap0
brctl addif br0 eth0
# On configure les interfaces en mode promiscuous (elles écoutent tout,
# mais n’ont pas d’adresses IP)
ifconfig eth0 0.0.0.0 promisc up
ifconfig tap0 0.0.0.0 promisc up
# On configure l’IP de l’interface "bridge" avec l’ancienne adresse de eth0.
ifconfig br0 192.168.0.66 netmask 255.255.255.0 broadcast 192.168.0.255
# On remet la passerelle par défaut, qui a été effacé
# lors de la création du bridge.
route add default gw 192.168.0.1
# On ajoute les routes pour atteindre les réseaux de la zone local.
route add -net 192.168.0.0 netmask 255.255.255.0 dev tap0
#dhclient br0
Here is my bridge-stop script :
#!/bin/bash
ifconfig br0 down
brctl delbr br0
ifconfig tap0 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255 up
ifconfig eth0 192.168.0.66 netmask 255.255.255.0 broadcast 192.168.0.255 up
Here is my client ovpn :
client
dev tap
# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one.
;dev-node MyTap
proto udp
remote vpn.lambla.eu 1338
resolv-retry infinite
nobind
persist-key
persist-tun
ca "ca.crt"
#ca "bridge.crt"
cert "client.crt"
#cert "bridge.crt"
key "client.key"
#key "bridge.key"
ns-cert-type server
#remote-cert-tls server
comp-lzo
verb 3
Can you help me please ?