Pass all traffic through OpenVPN

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
HirbodBehnam
OpenVpn Newbie
Posts: 2
Joined: Thu May 03, 2018 10:43 am

Pass all traffic through OpenVPN

Post by HirbodBehnam » Thu May 03, 2018 11:06 am

Hey guys I currently have OpenVPN installed on Windows server 2008 by following this guide. And my client is running on windows 10. My VPN connects every time but my IP is not changing. I had tried

Code: Select all

push "redirect-gateway def1"
or uncommenting

Code: Select all

push "redirect-gateway def1 bypass-dhcp"
on server config;But With that code, I can only ping my own server and nothing else works! Can some one give me a hand? I'm new with these stuff.

BTW here is my server config:
Server Config

port 443
proto tcp
dev tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\server.crt"
key "C:\\Program Files\\OpenVPN\\config\\server.key"
dh "C:\\Program Files\\OpenVPN\\config\\dh1024.pem"
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3

And my client:
Client Config

client
dev tun
proto tcp
remote my_vps_address 443
resolv-retry infinite
nobind
persist-key
persist-tun
ca "F:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "F:\\Program Files\\OpenVPN\\config\\Hirbod-PC.crt"
key "F:\\Program Files\\OpenVPN\\config\\Hirbod-PC.key"
tls-cipher "DEFAULT:@SECLEVEL=0"
remote-cert-tls server
comp-lzo
verb 3

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Pass all traffic through OpenVPN

Post by TinCanTech » Thu May 03, 2018 12:34 pm

Please see:
HOWTO: Routing all client traffic (including web-traffic) through the VPN
HirbodBehnam wrote:
Thu May 03, 2018 11:06 am
tls-cipher "DEFAULT:@SECLEVEL=0"
You are not using a VPN .. you only have a V_N with no P.

PLEASE DO NOT USE THIS .. UPDATE YOUR PKI TO A SECURE HASH.

The current verion of EasyRSA does this by default:
https://github.com/OpenVPN/easy-rsa/releases

For further help Please see:
HOWTO: Request Help ! {2}

HirbodBehnam
OpenVpn Newbie
Posts: 2
Joined: Thu May 03, 2018 10:43 am

Re: Pass all traffic through OpenVPN

Post by HirbodBehnam » Thu May 03, 2018 2:10 pm

I've tried adding these lines but no luck:

Code: Select all

push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
Also I will update my update my keys later.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Pass all traffic through OpenVPN

Post by TinCanTech » Thu May 03, 2018 2:29 pm

HirbodBehnam wrote:
Thu May 03, 2018 2:10 pm
I've tried adding these lines but no luck
Then you have not read the entire section .....

Post Reply