Page 1 of 1
routing through the tunneling
Posted: Mon Aug 15, 2011 5:18 am
by agoenk
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,
Re: routing through the tunneling
Posted: Mon Aug 15, 2011 1:17 pm
by george
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.
Re: routing through the tunneling
Posted: Mon Aug 15, 2011 6:39 pm
by Mimiko
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"
Re: routing through the tunneling
Posted: Wed Aug 17, 2011 12:01 pm
by agoenk
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?
Re: routing through the tunneling
Posted: Wed Aug 17, 2011 12:13 pm
by Mimiko
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.
Re: routing through the tunneling
Posted: Fri Aug 19, 2011 1:11 pm
by agoenk
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
Re: routing through the tunneling
Posted: Fri Aug 19, 2011 2:33 pm
by Mimiko
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