Thanks very much for your reply.
@GruensFroeschli:
Sorry i dont have anymore the time to look at the forum as much as i used to ;)
I use quite something similar as you want to connect my workplace with my home.
I use this to redirect certain traffic i dont want to go over my workplaces network to my home.
(private traffic from my iphone as an example).
How i did this:
Basically the same as you describe, however with some minor differences.
I dont use a PKI. For site-to-site connections i just prefer private shared key setups.
I use a PKI since that's what I get from the provider (StrongVPN), there's no option to use shared keys. Some other providers have it the other way around though.
I redirect traffic not with the "redirect def1" but with my policy routing.
I dont think what you are after is even possible while using "redirect def1".
That was my thought too and that's why I tried to manually (while testing) remove the entries from shell (worked) and then use policy routing, but it didn't work all the way.
Also you dont need two entried in the failover pool. A single entry is enough. (see screenshot).
Ok
Just set on the OPT-config page the correct IP like in the OpenVPN config and the corresponding gateway. As monitor i use the other side of the VPN.
This is just a workaround from a previous version, with 1.2.3 you can assign the VPN tunnel as interface and thus select it as gateway directly
Hmm yes that's what I've done, the VPN is an interface and much seem to work, I have incoming NAT and FW rules working through the tunnel from the outside too, and verified. Pretty cool. Means I could place my web server or whatever in Hong Kong :) and since IP is static I could add that as A record in DNS too.
This is actually another reason why to use a PSK and not a PKI. In a PSK you can hardcode the IP you use in the config.
In a PKI you can get dynamically a different IP when you have multiple clients. (of course you can use a client specific configuration).
I get the same IP etc every time from StrongVPN, in fact that's part of this service, a static IP for the duration of that specific account.
In my "custom options" i forced the site-to-site connection to "dev tun10" to ensure i always have the same dev when assigning the interface.
Ahh, that may be practical.
In the example screenshot below i redirect my Iphone on wireless over the VPN to my home.
The normal policy routing rules apply.
What i would do in your case:
Get rid of the PKI and set up a PSK.
Get rid of the failoverpool and use the gateway directly.
Change the firewall rules to redirect traffic however you want.
Thanks for your input, I will try and compare and do some testing. In this case (with this account) I will have to use the PKI though.
There is the problem with dead peer though, if my tunnel stops working for some reason (has happened a few times, tunnel appear up but no traffic goes through) I need to like disable/enable to get it back up but until that is done the network would be effectively offline if I have entered the VPN gateway instead of 'default' in the FW rule.
Maybe one could have a cron job running, pinging some VPN exit point IP and if no answer take down tunnel, bring back up and then remove those routing entries.
I'm also a bit concerned about those problems with WAN-services, like OpenVPN, PPTP, they seem not to work while tunnel is up, even though port forwarded services work fine. I'll try to do some more testing on that too.
Cheers,