Please read this:

https://community.openvpn.net/openvpn/wiki/HOWTO#Routingallclienttrafficincludingweb-trafficthroughtheVPN

http://openvpn.net/index.php/open-source/documentation/howto.html#redirect

thanks


On 18/12/16 06:17, Muhammad Yousuf Khan wrote:
> Hello All,
>
> I have been using openvpn for years this is a great vpn application. today
> i tuck in a issue which i never face before. i wanted to redirect all
> traffic through vpn for a client however it is not working. i place the
> redirect-gateway def1 in server config and client configs individually and
> on both configs at same time. but nothing works.
> the confusing point is that when remove the redirect-gateway value from
> both config. my vpn works fine. i can ping remote network IPs with no
> problem. but when i use this option i fail to ping any ip on remote. or
> even in local network. i dont know what is going on need you expert advice
> please.
>
> here is my server config
>
> port 10640
> proto tcp-server
> dev tun0
> ca keys/jp-ca/ca.crt
> cert keys/jp-ca/openvpn-srv-key.crt
> key keys/jp-ca/openvpn-srv-key.key
> dh keys/jp-ca/dh2048.pem
> server 10.8.0.0 255.255.255.0
> crl-verify keys/jp-ca/crl.pem
> cipher DES-CBC
> user nobody
> group nogroup
> status servers/jp-ovpn-srv/logs/openvpn-status.log
> log-append servers/jp-ovpn-srv/logs/openvpn.log
> verb 6
> mute 20
> max-clients 100
> keepalive 10 60
> client-config-dir /etc/openvpn/servers/jp-ovpn-srv/ccd
> client-to-client
> duplicate-cn
> persist-key
> persist-tun
> ccd-exclusive
> push "route 10.8.0.0 255.255.255.0"
> push "route 10.1.1.0 255.255.255.0"
> push "dhcp-option DNS 8.8.8.8"
> push "redirect-gateway def1"
>
>
>
> and here i my client side config
> client
> proto tcp
> dev tun
> ca ca.crt
> dh dh2048.pem
> cert ykhan-desktop.crt
> key ykhan-desktop.key
> cipher DES-CBC
> verb 2
> mute 20
> keepalive 10 120
> #comp-lzo no
> persist-key
> persist-tun
> float
> resolv-retry infinite
> nobind
> pull
> remote 178.22.67.201 3389
> socks-proxy-retry
> socks-proxy 127.0.0.1 447
> #redirect-gateway
> #route 0.0.0.0 0.0.0.0 net_gateway
>
>
> Can you guys please help. any hint or idea will be highly appreciated.
>
> Thanks,
> Yousuf
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Openvpn-users mailing list
> Openvpn-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openvpn-users
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-users mailing list
Openvpn-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-users

Reply via email to