routing through the tunneling

Need help configuring your VPN? Just post here and you'll get that help.

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
agoenk
OpenVpn Newbie
Posts: 11
Joined: Wed Mar 16, 2011 3:35 pm

routing through the tunneling

Post by agoenk » Mon Aug 15, 2011 5:18 am

how it'll turn routing via tunneling?

eth0: 192.16.168.1/24 ------------------------------------------- eth0: 172.16.253.100/16
tun0: 10.8.0.6 --------------------------------------------- ----------- tun0: 10.8.0.1

using the operating system: linux

thanks,

george
Forum Team
Posts: 117
Joined: Tue Jun 09, 2009 4:25 pm
Location: St. Louis, MO USA

Re: routing through the tunneling

Post by george » Mon Aug 15, 2011 1:17 pm

Not nearly enough information for us to help. Please read the forum rules on asking for help, and try to give as much info as possible, server client configs, your issue your goal, etc, etc.

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: routing through the tunneling

Post by Mimiko » Mon Aug 15, 2011 6:39 pm

add to you OpenVPN server's configuration:

Code: Select all

route 172.16.0.0 255.255.0.0
push "route 192.16.168.0 255.255.255.0"

agoenk
OpenVpn Newbie
Posts: 11
Joined: Wed Mar 16, 2011 3:35 pm

Re: routing through the tunneling

Post by agoenk » Wed Aug 17, 2011 12:01 pm

I have a vpn topology like this:


Client 1---------------------------Server ----------------------- Client2
eth0: 192.16.10.10 ------------- eth0:192.16.168.100 --------- eth0: 172.16.253.10
tun0: 10.8.0.6 --------------------tun0 10.8.0.1 ---------------- tun0: 10.8.0.10

in Client1, routing to network 192.16.168.0 gw 10.8.0.6
192.16.168.0/24 route add-net 10.8.0.6 gw devtun0

but when the traceroute, still through eth0, instead of tun0

where the problem?

how to keep all communication using tunneling?

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: routing through the tunneling

Post by Mimiko » Wed Aug 17, 2011 12:13 pm

but when the traceroute, still through eth0, instead of tun0
To where you make traceroute?
in Client1, routing to network 192.16.168.0 gw 10.8.0.6
192.16.168.0/24 route add-net 10.8.0.6 gw devtun0
You are adding this manually?

Show OpenVPN server and client configs and logs.

agoenk
OpenVpn Newbie
Posts: 11
Joined: Wed Mar 16, 2011 3:35 pm

Re: routing through the tunneling

Post by agoenk » Fri Aug 19, 2011 1:11 pm

when trace route to 192.16.168.100 from client1 is via eth0, not through tun0: 10.8.0.6

<server.conf>
local 192.16.168.100
port 1194
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
ifconfig-pool-persist ipp.txt
cipher AES-128-CBC
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3

<client.conf>
client
dev tun
proto tcp
remote 192.16.168.100 1194
ca ca.crt
cert client1.crt
key client1.key
cipher AES-128-CBC
persist-key
persist-tun
comp-lzo
verb 3

manual routing
-> Route add-net 192.16.168.0/24 gw 10.8.0.6

Please corrected
thanks

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: routing through the tunneling

Post by Mimiko » Fri Aug 19, 2011 2:33 pm

Ofcourse route to public IP of OpenVPN server will always go thru client's public IP, otherwise the connection can't be made. If you want to route internet traffic thru tunnel, read this: http://www.openvpn.net/index.php/open-s ... l#redirect

Post Reply