Hi there -
I have two IPv6 tunnels to two different providers, and two subnets.
Unfortunately, routing based on source-address doesn't appear to be possibly
directly (I'm using FreeBSD-STABLE), and all IPv6 traffic is getting sent over
the default route, regardless of source address. Given that neither tunnel is
willing to route the other's space (understandably) this is a bit of a pain.
Trying to figure out how to use ipfilter's fastrouting features to get around
the problem has been driving me nuts for the last few days. Perhaps someone
can tell me where I'm going wrong.
I have IPFILTER_DEFAULT_BLOCK in my kernel, my ruleset looks like this:
# Allow all packets on the loopback interface
pass out quick on lo0 all
pass in quick on lo0 all
# Allow all packets on the internal interface
pass out quick on rl0 all
pass in quick on rl0 all
# [loads of pass in quick keep state rules for various services on various hosts]
# This is where things go wrong
pass out quick on gif0 to gif1:x from y::/60 to any keep state
# Just let everything out
pass out quick proto tcp from any to any keep state
pass out quick proto udp from any to any keep state
pass out quick proto ipv6-icmp from any to any keep state
# Cleanly kill unwanted packets
block return-rst in log quick proto tcp all
block return-icmp(port-unr) in log quick proto udp all
block return-icmp(host-unr) in log quick proto ipv6-icmp all
Where 'x' is the remote endpoint of my tunnel to one of my providers, and 'y'
is the address space associated with the tunnel. My default route points at
the other provider.
Everything works properly, except that replies to packets sent using address
space y don't find their way back to the host that wants them. When I log the
rule, I get in my logs:
gif0 @0:3 p [source] -> [dest] PR icmpv6 len 40 16 icmpv6 echo/0 K-S OUT
gif1 @0:3 p [dest] -> [source] PR icmpv6 len 40 16 icmpv6 echoreply/0 K-S IN
However, ping6 gives 100% packet loss. A traceroute6 also times out. A TCP
session looks even more interesting, but same results: doesn't work.
gif0 @0:3 p [source],49175 -> [dest],5223 PR tcp len 40 40 -S K-S OUT
gif1 @0:3 p [dest],5223 -> [source],49175 PR tcp len 40 40 -AS K-S IN
rl0 @0:3 p [source],49175 -> [dest],5223 PR tcp len 40 40 -S K-S IN
2x gif1 @0:3 p [dest],5223 -> [source],49175 PR tcp len 40 40 -AS K-S IN
rl0 @0:3 p [source],49175 -> [dest],5223 PR tcp len 40 40 -S K-S IN
Any idea where I'm going wrong?
Thanks!
- Philip
--
Philip Paeps Please don't CC me, I am
subscribed to the list.
Authorisation for a project will be granted only when
none of the authorisers can be blamed if the project
fails but when all of the authorisers can claim credit
if it succeeds.