Redirecting traffic to and from specific IP
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.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVpn Newbie
- Posts: 8
- Joined: Mon Apr 18, 2011 4:28 pm
Redirecting traffic to and from specific IP
Hello,
I have a routing issue with my ISP, and my work around is to (currently) push redirect gateway def1.
This is not desirable as i wish to only have data going to and from a specific IP (173.208.82.122 in this case).
I have the server running on Win XP, and the client is on Win 7.
Cheers.
I have a routing issue with my ISP, and my work around is to (currently) push redirect gateway def1.
This is not desirable as i wish to only have data going to and from a specific IP (173.208.82.122 in this case).
I have the server running on Win XP, and the client is on Win 7.
Cheers.
- maikcat
- Forum Team
- Posts: 4200
- Joined: Wed Jan 12, 2011 9:23 am
- Location: Athens,Greece
- Contact:
Re: Redirecting traffic to and from specific IP
hi there,
what exactly is your question?
can you post configs (server/client)
Michael.
what exactly is your question?
can you post configs (server/client)
Michael.
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)
Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)
"objects in mirror are losing"
Long live Dino Dini (Kick off 2 Creator)
Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)
"objects in mirror are losing"
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Redirecting traffic to and from specific IP
if you only need to route stuff to 173.208.82.122 via the VPN then simply add
to the client config and do not use redirect-gateway; however, you will also need to make sure that your vpn server does some sort of masquerading/NAtting, or the gateway/router connected to the VPN server needs to do this.
If 'redirect-gateway' was working for you then this was already in place.
Code: Select all
route 173.208.82.122 255.255.255.255
If 'redirect-gateway' was working for you then this was already in place.
-
- OpenVpn Newbie
- Posts: 8
- Joined: Mon Apr 18, 2011 4:28 pm
Re: Redirecting traffic to and from specific IP
Any way to choose specific ports for this also?janjust wrote:if you only need to route stuff to 173.208.82.122 via the VPN then simply add
to the client config and do not use redirect-gateway; however, you will also need to make sure that your vpn server does some sort of masquerading/NAtting, or the gateway/router connected to the VPN server needs to do this.Code: Select all
route 173.208.82.122 255.255.255.255
If 'redirect-gateway' was working for you then this was already in place.
Also, I am having horrific packet drop.
client
Code: Select all
client
dev tun
proto udp
remote demeter.dyndns-server.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert proteus.crt
key proteus.key
ns-cert-type server
comp-lzo
verb 3
#explicit-exit-notify 2
ping 10
ping-restart 600
route-method exe
route-delay 2
cipher none
Code: Select all
port 1194
proto udp
dev tun
server 192.168.0.0 255.255.255.0 #you may choose any subnet. 10.0.0.x
is used for this example.
ca ca.crt #certs are optional. you may choose to go
with keys or passwords instead.
cert server.crt
key server.key
dh dh1024.pem
#push "redirect-gateway def1"
push "route 173.208.82.122 255.255.255.255"
push "dhcp-option DNS 8.8.8.8" #google dns is a temporary
measure until the Windows XP solution is known
#the following commands are optional
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 3
cipher none
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Redirecting traffic to and from specific IP
routing is on IP level only, i.e. you cannot route only port 80 or 443.
As for horrible packet drop: are you talking about packets inside or outside of the tunnel? how do you quantify 'packet drop' ? dropped ICMP packets?
As for horrible packet drop: are you talking about packets inside or outside of the tunnel? how do you quantify 'packet drop' ? dropped ICMP packets?
-
- OpenVpn Newbie
- Posts: 8
- Joined: Mon Apr 18, 2011 4:28 pm
Re: Redirecting traffic to and from specific IP
I run ping plotter, and i assume outside of the tunnel would be from the server to the outside internet. And yes, that is where the packet drop is.
ping plotter cannot show inter tunnel drop as all it shows is my PC to the server, then there to the outside world. So i do not know how much it is losing in the route from my PC to the server.
ping plotter cannot show inter tunnel drop as all it shows is my PC to the server, then there to the outside world. So i do not know how much it is losing in the route from my PC to the server.
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Redirecting traffic to and from specific IP
what about running
ping <server-VPN-IP>
for some time (or 'ping -t' on windows) ? that should give you some nice statistics.
ping <server-VPN-IP>
for some time (or 'ping -t' on windows) ? that should give you some nice statistics.
-
- OpenVpn Newbie
- Posts: 8
- Joined: Mon Apr 18, 2011 4:28 pm
Re: Redirecting traffic to and from specific IP
I guess what i should ask, as a more open question. Is what can I do to streamline this the most for online gaming use? As that is what it is currently being used for.
Packet drop is 3% btw.
Packet drop is 3% btw.
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Redirecting traffic to and from specific IP
so what is the packet loss when comparing
ping -t <server-LAN-IP>
(i.e outside or no tunnel) vs
ping -t <server-VPN-IP>
if the line to the server is bad there's little you can do about it...
ping -t <server-LAN-IP>
(i.e outside or no tunnel) vs
ping -t <server-VPN-IP>
if the line to the server is bad there's little you can do about it...
-
- OpenVpn Newbie
- Posts: 8
- Joined: Mon Apr 18, 2011 4:28 pm
Re: Redirecting traffic to and from specific IP
The server is totally unpingable when not connected to the VPN. Yet i can still remote desktop to it and everything.
and as stated above, through the VPN, pinging the server is 3% loss.
and as stated above, through the VPN, pinging the server is 3% loss.
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Redirecting traffic to and from specific IP
hmmm I'm still curious how good the line without the VPN is ; 3% packet loss is not great, but also not terrible. as an experiment you could also switch to 'proto tcp' to see if it has an effect - I'm pretty sure it shouldn't, but let's rule it out.
-
- OpenVpn Newbie
- Posts: 8
- Joined: Mon Apr 18, 2011 4:28 pm
Re: Redirecting traffic to and from specific IP
TCP over TCP = massive ping increase. I'll test the drop rate now but
Result : 0% loss
Result : 0% loss
-
- OpenVpn Newbie
- Posts: 8
- Joined: Mon Apr 18, 2011 4:28 pm
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Redirecting traffic to and from specific IP
bump? I'm still not certain what you meant with
tcp over tcp means no packet loss? that is good ; the ping time can be perhaps controlled using 'tcp-nodelay' on the server side.TCP over TCP = massive ping increase. I'll test the drop rate now but
Result : 0% loss
-
- OpenVpn Newbie
- Posts: 8
- Joined: Mon Apr 18, 2011 4:28 pm
Re: Redirecting traffic to and from specific IP
Cheers, I'll give that a tryjanjust wrote:bump? I'm still not certain what you meant withtcp over tcp means no packet loss? that is good ; the ping time can be perhaps controlled using 'tcp-nodelay' on the server side.TCP over TCP = massive ping increase. I'll test the drop rate now but
Result : 0% loss
And what i meant with "tcp over tcp" is that it is commonly shunned. So i felt like mentioning that that was the case in that test.