How to configure OpenVPN server to use custom default gateway?
Posted
by
Arenim
on Server Fault
See other posts from Server Fault
or by Arenim
Published on 2014-06-03T14:56:53Z
Indexed on
2014/06/03
15:29 UTC
Read the original article
Hit count: 183
I have a vpn server at address 10.1.0.2
and the server have another ip in it's network -- 10.0.0.2
in his subnet (it's a tun2socks router).
But default server's gateway is NOT 10.0.0.2
(and it's ok) but another external IP.
I want all the client's traffic to be forwarded through this ip address -- 10.0.0.2
.
Here is part of my server's config:
dev tap0
server-bridge 10.1.0.1 255.255.255.0 10.1.0.50 10.1.0.100
push "route 10.0.0.0 255.255.255.0" ; now client can ping 10.0.0.2
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 10.1.0.1"
push "dhcp-option WINS 10.1.0.1"
in fact i want some like push "redirect-gateway 10.0.0.2"
How can I achieve this?
© Server Fault or respective owner