oibaf79
Hi,
i have a problem with the server-bridge, i can connect to the server with the vpn but i cannot access to the local network (other pc in the local net).
This is the server config:
dev tap
proto udp
port 1194
proto udp
dev tap
dev-node tap
server-bridge 192.168.0.13 255.255.255.0 192.168.0.128 192.168.0.254
ca C:\\keys\\ca.crt
cert C:\\keys\\server.crt
key C:\\keys\\server.key
dh C:\\keys\\dh1024.pem
duplicate-cn
comp-lzo
keepalive 10 120
status openvpn-status.log
verb 4
My local network is 192.168.1.1.
Someone can help me with this problem?
Thanks.
janjust
please read up on how bridging works: you should specify a bridge IP that is in the same range as your local LAN (unless you have multiple LANs connected to your VPN server).
Try changing the 'server-bridge' line to
server-bridge 192.168.1.13 255.255.255.0 192.168.1.128 192.168.1.254
but make sure your IPs don't overlap with your LAN IPs
oibaf79
thanks for the help,
I also tried this configuration, I can connect but i haven't access to the local network, my server has internal ip 192.168.1.13
Is there any other setting to be set? how can I fix this?
Thank you.
maikcat
hi there,
did you bridged the tap with the lan interfaces inside windows?
Michael.
oibaf79
hi,
i created a bridge between the LAN and the tap-win32 adapter in windows, my server vpn has ip 192.168.1.13.
The server has this configuration file:
dev tap
proto udp
;local a.b.c.d
port 1194
proto udp
dev tap
dev-node tap
server-bridge 192.168.1.0 255.255.255.0 192.168.1.249 192.168.1.254
cipher BF-CBC
ca C:\\keys\\ca.crt
cert C:\\keys\\server.crt
key C:\\keys\\server.key
dh C:\\keys\\dh1024.pem
duplicate-cn
comp-lzo
keepalive 10 120
status openvpn-status.log
verb 4
client-to-client
the client has this:
client
dev tap
proto udp
remote dynserver 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
comp-lzo
verb 3
i can connect to the server but i can't see any local resource, even the server.
I don't know how can fix this.
oibaf79
an update, I can connect using the 3g and see all the local network.
If i use an external wifi, i can connect but i cannot access to the local network, this because there is a conflict between the internal IP of my local network 192.168.1.x and the external wifi network that use the same internal ip.
For example my router has internal ip 192.168.1.1 but also the external wifi has the same ip for the router so i can't access to the local router ip.
Is there a way to make it work?
Tnx
maikcat
if both (your server lan network and your client lan network) are the same
then no it wont work in bridge mode...
try to use a different subnet on your server side.
Michael.
oibaf79
tnx maikcat for the reply, so i must change the config file of the server with this?
server-bridge 192.168.0.13 255.255.0.0 192.168.0.128 192.168.0.254
might work with this change or you mean something else?
Very tnx
maikcat
you must also change your entire lan ip as well not only openvpn config...
Michael.
oibaf79
i have a router italian of telecom alice and i can't change the local lan ip.
There is a way to change the local ip by changing the settings of the windows or maybe i can follow another way?
maikcat
can you use ip alias on router?
why dont you use openvpn in routing mode?
Michael.
oibaf79
for the routing mode i must change only the config of the server? Could you help me with the changes to make to run the routing mode?
Thank you
maikcat
2 changes
dev tun instead of tap
server 10.8.0.0 255.255.255.0 instead of server-bridge
also add
push "route your-lan-net 255.255.255.0"
also unbridge tap & eth interfaces
restart service and you are ready
connect and try to ping servers lan ip
Michael.
oibaf79
this is the server config:
dev tun
proto udp
port 1194
proto udp
server 10.8.0.0 255.255.255.0
push "route 192.168.1.0 255.255.255.0"
cipher BF-CBC
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
duplicate-cn
comp-lzo
keepalive 10 120
status openvpn-status.log
verb 4
client-to-client
And this is the config client:
client
dev tun
ifconfig 10.8.0.2 255.255.255.0
proto udp
remote mydns 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
certclient1.crt
key client1.key
ns-cert-type server
comp-lzo
verb 3
I can connet to the server and i can see only the server at address 10.8.0.1 (the ip on the local network is 192.168.1.11) but i can't see the local resources at 192.168.1.x 🙁
maikcat
if you cant ping local lan openvpn server address
check if you didnt enable ip forwarding,
to access the rest of pcs you must:
add a static route to every each one of them for subnet 10.8.0.0/24 network pointing to
your lan openvpn server ip
-or-
add the above static route to your pcs default gateway.
ps:disable firewall on openvpn server itself for testing
Michael.
oibaf79
I changed my router and now everything works fine.
Tnx 😃