lan DHCP requests
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 5
- Joined: Wed Sep 21, 2011 12:39 pm
lan DHCP requests
hi
does someone knows how to send/recive lan dhcp request over bridge ? i have 2 sites connected with briged openvpn and i want do recive dhcp to the second site lan from the dhcp server from the first one.
there is my config.
client
dev tap
proto udp
remote 99.99.99.1 11194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
pull
cert client1.crt
key client2.key
ns-cert-type server
tls-auth ta.key 1
cipher AES-128-CBC
comp-lzo
verb 3
route-delay 2
SERVER
port 11194
local 10.0.0.8
proto udp
;dev tun0
dev tap0
;dev-node tap-bridge
daemon
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
tls-auth ta.key 0
push "route 10.0.0.0 255.255.255.0"
push "dhcp-option DNS 10.0.0.6"
push "dhcp-option DNS 193.231.252.1"
push "redirect-gateway def1"
ifconfig-pool-persist client-adresses.txt
client-to-client
keepalive 10 120
cipher AES-128-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
log openvpn
verb 3
mute 20
does someone knows how to send/recive lan dhcp request over bridge ? i have 2 sites connected with briged openvpn and i want do recive dhcp to the second site lan from the dhcp server from the first one.
there is my config.
client
dev tap
proto udp
remote 99.99.99.1 11194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
pull
cert client1.crt
key client2.key
ns-cert-type server
tls-auth ta.key 1
cipher AES-128-CBC
comp-lzo
verb 3
route-delay 2
SERVER
port 11194
local 10.0.0.8
proto udp
;dev tun0
dev tap0
;dev-node tap-bridge
daemon
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
tls-auth ta.key 0
push "route 10.0.0.0 255.255.255.0"
push "dhcp-option DNS 10.0.0.6"
push "dhcp-option DNS 193.231.252.1"
push "redirect-gateway def1"
ifconfig-pool-persist client-adresses.txt
client-to-client
keepalive 10 120
cipher AES-128-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
log openvpn
verb 3
mute 20
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: lan DHCP requests
this is possible, if the bridge is set up correctly ; you did not use any form of
on the server side - check your setup.
Code: Select all
server-bridge
server-bridge IP netmask pool
-
- OpenVpn Newbie
- Posts: 5
- Joined: Wed Sep 21, 2011 12:39 pm
Re: lan DHCP requests
i missed that when i posted . i was really tired .sorry
server-bridge 10.0.0.8 255.255.255.0 10.0.0.150 10.0.0.255
still not working
server-bridge 10.0.0.8 255.255.255.0 10.0.0.150 10.0.0.255
still not working
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: lan DHCP requests
change it to simply
openvpn will no longer assign IPs from a specific pool but will forward the DHCP request to a remote DHCP server. Address assignment is a bit slower in this case, but I've seen it work.
Code: Select all
server-bridge
-
- OpenVpn Newbie
- Posts: 5
- Joined: Wed Sep 21, 2011 12:39 pm
Re: lan DHCP requests
i try ur ideea
and with this conf the tap is not getting up . on the windows lapetop (where the tap/tun is added with the install) it gives ip , but on linux machine ... no . take a look at the openvpn output
Code: Select all
port 11194
proto udp
dev tap0
daemon
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
tls-auth ta.key 0
server-bridge
push "route 10.0.0.0 255.255.255.0"
push "dhcp-option DNS 10.0.0.6"
push "dhcp-option DNS 193.231.252.1"
push "redirect-gateway def1"
ifconfig-pool-persist client-adresses.txt
client-to-client
keepalive 10 120
cipher AES-128-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
log openvpn
verb 3
mute 20
mssfix 1400
fragment 1400
Code: Select all
OpenVPN CLIENT LIST
Updated,Fri Sep 23 19:01:32 2011
Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since
craiova,xxx.xx.xx.xx:53063,6532,12001,Fri Sep 23 18:58:43 2011
georgee,yyy.yyy.yyy.yyy:65156,132118,107669,Fri Sep 23 18:48:44 2011
ROUTING TABLE
Virtual Address,Common Name,Real Address,Last Ref
00:ff:0d:6e:94:ab,georgee,xxx.xx.xx.xx:65156,Fri Sep 23 19:01:06 2011
GLOBAL STATS
Max bcast/mcast queue length,3
END
-
- OpenVpn Newbie
- Posts: 5
- Joined: Wed Sep 21, 2011 12:39 pm
Re: lan DHCP requests
what else do u think i should do
-
- OpenVPN Power User
- Posts: 58
- Joined: Fri Oct 07, 2011 12:23 pm
- Location: Pune
- Contact:
Re: lan DHCP requests
On windows it takes I.P automatically while on linux you need to run dhcp client
such as dhclient tap0 that will broadcast dhcp request to dhcp server.
I was facing same problem, and soved it by running dhclient tap0
on client side.
Thanking You
===========================================
Tushar
such as dhclient tap0 that will broadcast dhcp request to dhcp server.
I was facing same problem, and soved it by running dhclient tap0
on client side.
Thanking You
===========================================
Tushar