Bug #3198
closed
IPSEC, when nating to a different size subnet a invalid natting rule is made.
Added by Pi Ba over 12 years ago.
Updated over 11 years ago.
Affected Architecture:
All
Description
IPSEC, when nating to a different size subnet a invalid natting rule is made.
Reproducable with these phase2 settings:
Local: 192.168.1.0/24
NAT/BINAT: 172.16.44.0/28
Remote: 20.0.0.0/24
[ There were error(s) loading the rules: /tmp/rules.debug:66: binat source mask and redirect mask must be the same - The line in question reads [66]: binat on enc0 from 192.168.1.0/24 to 20.0.0.0/24 -> 172.16.44.0/28]
Also a localnet of 0.0.0.0 and natting that to a subnet generates no rule at all..
Also disabled ipsec rules still generate nat rules..
This can be fixed by: https://github.com/pfsense/pfsense/pull/784
Forgot to add that the VPNs work after the patch, binat is perfect, but my firewall is useless.
- Status changed from New to Feedback
This should be fixed on 2.2
- Status changed from Feedback to New
- Target version set to 2.2
this is still an issue. That pull request was not the answer though.
It should suffice (for 2.2) to add input validation on vpn_ipsec_phase2.php to require using matching subnet sizes where you're using "network" for NAT/BINAT. Either your subnet size has to match (binat), or you need to NAT to a single IP.
Or - allow mismatched subnet sizes, but skip the binat in that circumstance (then people can still manually configure their NAT via outbound NAT).
- Status changed from New to Confirmed
- Status changed from Confirmed to Feedback
- % Done changed from 90 to 100
Applied in changeset commit:a8a642c5c8eff62f7beb228b165b9e1e38e3a7c2.
- Status changed from Feedback to Resolved
fixed. users will need to manually configure outbound NAT as desired in this circumstance.
Also available in: Atom
PDF