Project

General

Profile

Actions

Bug #6625

closed

firewall forwards all traffic through wan interface, via default gateway, even if alternative route had been installed

Added by Remko Lodder over 8 years ago. Updated almost 8 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
07/18/2016
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
Affected Architecture:

Description

We have setup a new pfSense box that will route our VPN traffic between endpoints.
That goes out on our WAN interface which has a default GW assigned.

However, we use a different gateway for our VPN traffic. Setting this gateway does not result in the firewall using the alternative gateway, it is set by static configurations in inc/filter.inc:

3516                         #$ipfrules .= "pass out {$log['pass']} route-to ( {$ifcfg['if']} {$gw} ) from {$ifcfg['ip']} to !{$ifcfg['sa']}/{$ifcfg['sn']} tracker {$increment_tracker($tracker)} keep state allow-opts label
\"let out anything from firewall host itself\"\n";

the same goes for defined IPSEC traffic:

4127                                         $route_to = " route-to ( $interface $gateway ) ";
4128 $reply_to = " reply-to ( $interface $gateway ) ";
4136                                         $route_to = " route-to ( $interface $gateway ) ";
4137 $reply_to = " reply-to ( $interface $gateway ) ";

where we have replaced this $gateway with our external address to bypass the traffic.

Also hashing out line 3516 makes it at least possible to ping the host.

Next to that I noticed that a reguliar host entry is created for the external IP address that has an static entry pointing towards the default gateway instead of the alternative gateway. (there is an /32 also installed for the static entry that we created).

schemantic of what we want:

AP --> IPSEC Tunnel to pfSense --> pfSense box over alternative GW then the default on the WAN
^ WAN Interface ^

If you need additional help/info please let me know then I will try to deliver it.

Actions

Also available in: Atom PDF