K
K
Konkase2014-08-27 21:46:13
openvpn
Konkase, 2014-08-27 21:46:13

How to give default in openvpn through another ip ?

Good afternoon! Raised openvpn tunnel by bridge to local interface. vpn server address is 192.168.0.101, gateway address is 192.168.0.1, openvpn client is assigned address 192.168.0.240 on tap0, question: How to send default route to client via 192.168.0.1 ?
options that do not work:
push "redirect-gateway def1" - sends the address of the vpn server itself by default route
push "redirect-gateway 192.168.0.1" - does not send anything at all
push "route 0.0.0.0 0.0.0.0 192.168.0.1" - also does not
server is passed :

proto udp
dev tap0
log /var/log/openvpn.log
verb 3
ca keys/ca.crt
cert keys/1.crt
key keys/1.key
dh keys/dh1024.pem
server-bridge 192.168.0.101 255.255.255.0 192.168.0.240 192.168.0.250
route-gateway dhcp
#push "redirect-gateway def1"
#client-to-client
push "comp-lzo yes"
comp-lzo
keepalive 10 120
persist-key
persist-tun
client-cert-not-required
username-as-common-name

client:
client
dev tap
remote server.com
log /var/log/openvpn.log
proto udp
persist-key
persist-tun
comp-lzo
ca ca.crt
auth-user-pass
nobind

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor, 2014-08-27
@merryjane

And why, if not a secret?
In any case, traffic will go through the vpn server. And in any case, it will route it to its default, unless other routes / rules are prescribed.

C
Cool Admin, 2014-08-27
@ifaustrue

What is in the routing table after such a push
route 0.0.0.0/0 192.168.0.1 10
And after https://forums.openvpn.net/topic13773.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question