Hello.
I use PF on my FreeBSD gateway. There is the connection diagram:
A part of my pf.conf:
The problem is: VPN (PPTP) works only through first (primary) ISP.
doesn't work.
I tested rules with SSH:
This works fine. I can be connected to the VPN server via SSH through both external IPs.
Where is the error in my PF rules? Or maybe the reply-to directive doesn't work with GRE protocol?
I use PF on my FreeBSD gateway. There is the connection diagram:

A part of my pf.conf:
Code:
...
rdr on $ext_if_1 proto tcp from any to $ext_if_1 port pptp tag EXT_PPTP_1 -> $vpnsrv port pptp
rdr on $ext_if_2 proto tcp from any to $ext_if_2 port pptp tag EXT_PPTP_2 -> $vpnsrv port pptp
rdr on $ext_if_1 proto gre from any to $ext_if_1 tag EXT_GRE_1 -> $vpnsrv
rdr on $ext_if_2 proto gre from any to $ext_if_2 tag EXT_GRE_2 -> $vpnsrv
...
pass in quick from ($ext_if_1:network) tagged EXT_PPTP_1 keep state
pass in quick reply-to ($ext_if_1 $gw_1) tagged EXT_PPTP_1 keep state
pass in quick from ($ext_if_1:network) tagged EXT_GRE_1 keep state
pass in quick reply-to ($ext_if_1 $gw_1) tagged EXT_GRE_1 keep state
pass in quick from ($ext_if_2:network) tagged EXT_PPTP_2 keep state
pass in quick reply-to ($ext_if_2 $gw_2) tagged EXT_PPTP_2 keep state
pass in quick from ($ext_if_2:network) tagged EXT_GRE_2 keep state
pass in quick reply-to ($ext_if_2 $gw_2) tagged EXT_GRE_2 keep state
...
pass on $dmz_if proto gre from any to any
The problem is: VPN (PPTP) works only through first (primary) ISP.
tcpdump
shows that GRE traffic returns to the VPN client always through the default gateway. The reply-to directive in the rule
Code:
pass in quick reply-to ($ext_if_2 $gw_2) tagged EXT_GRE_2 keep state
I tested rules with SSH:
Code:
rdr on $ext_if_1 inet proto tcp to ($ext_if_1) port 22222 tag EXT_IF_1 -> $vpnsrv port ssh
rdr on $ext_if_2 inet proto tcp to ($ext_if_2) port 22222 tag EXT_IF_2 -> $vpnsrv port ssh
pass in quick from ($ext_if_1:network) tagged EXT_IF_1
pass in quick reply-to ($ext_if_1 $gw_1) tagged EXT_IF_1
pass in quick from ($ext_if_2:network) tagged EXT_IF_2
pass in quick reply-to ($ext_if_2 $gw_2) tagged EXT_IF_2
Where is the error in my PF rules? Or maybe the reply-to directive doesn't work with GRE protocol?