Route public IP from openVPN Server through VPN
Posted: Tue Feb 16, 2016 5:06 pm
Hi there,
I have a server which has an apache webserver and openVPN Server installed. So my openVPN connection works fine. All Traffic is tunneld through it. But if I want to access my Webserver via https and via the puplic IP form the server, my traffic will not go through the VPN connection. So i guess the problem occurs, because of the routing for the puplic IP from the server.
How to solve that?
My config files for a client and the server:
server.conf
client.ovpn
I have a server which has an apache webserver and openVPN Server installed. So my openVPN connection works fine. All Traffic is tunneld through it. But if I want to access my Webserver via https and via the puplic IP form the server, my traffic will not go through the VPN connection. So i guess the problem occurs, because of the routing for the puplic IP from the server.
How to solve that?
My config files for a client and the server:
server.conf
Code: Select all
port 10434
proto udp
dev tun
sndbuf 0
rcvbuf 0
ca ca.crt
cert server.crt
key server.key
dh dh.pem
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 192.168.5.1"
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
crl-verify /etc/openvpn/easy-rsa/pki/crl.pem
user nobody
group nogroup
log-append /var/log/openvpn.log
tun-mtu 1460
mssfix 1420
Code: Select all
client
dev tun
proto udp
pull
sndbuf 0
rcvbuf 0
remote dns.example.com 10434
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
comp-lzo
verb 3
<ca>
...