Project

General

Profile

Actions

Bug #12408

closed

Input validation prevents creating 1:1 NAT rules on OpenVPN

Added by Chriss E over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Viktor Gurov
Category:
Rules / NAT
Target version:
Start date:
Due date:
% Done:

0%

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

Description

Maybe related to https://redmine.pfsense.org/issues/11751 but for 1:1 NAT rules with OpenVPN interface selected

When attempting to create a 1:1 NAT rule on a OpenVPN interface the following error is presented,

The following input errors were detected:

    The interface does not have an address from the specified address family.

This was not an issue for pfSense < 2.5. The existing 1:1 NAT rules (created pre-pfSense 2.5) for OpenVPN interfaces works so this seems to only be a issue with the frontend validation.

In issue 11751 it is stated that the fix should also fix the issue with OpenVPN but its does not.


Files

Screenshot 2021-09-27 112827.png (92.6 KB) Screenshot 2021-09-27 112827.png image showing the error Chriss E, 09/27/2021 04:28 AM
openvpn_int.png (11.5 KB) openvpn_int.png Alhusein Zawi, 10/14/2021 07:30 PM
Actions #1

Updated by Chriss E over 2 years ago

Tested on Netgate pfSense Plus 21.05.1-RELEASE (amd64)

Actions #2

Updated by Chriss E over 2 years ago

The problem seems to be that the array value of 'openvpn' does not reflect the actual value sent by firewall_nat_1to1.inc

$vpn_and_ppp_ifs = array("l2tp", "pppoe", "enc0", "openvpn");

The value sent when selecting an OpenVPN interface is sent as interface "opt1" and not "openvpn" or "enc0" for IPSec.

Actions #3

Updated by Chriss E over 2 years ago

I worked around the issue temporarily by adding opt-interfaces to the array,

$vpn_and_ppp_ifs = array("l2tp", "pppoe", "enc0", "openvpn", "opt1", "opt2", "opt3");

Actions #5

Updated by Jim Pingle over 2 years ago

  • Status changed from New to Pull Request Review
  • Assignee set to Viktor Gurov
  • Target version set to 2.6.0
  • Plus Target Version set to 22.01
Actions #6

Updated by Viktor Gurov over 2 years ago

  • Status changed from Pull Request Review to Feedback

Merged

Actions #7

Updated by Alhusein Zawi over 2 years ago

able to create 1:1 NAT on openvpn int.

2.6.0.a.20211013.0500

Actions

Also available in: Atom PDF