Cannot port forward: "not a valid redirect target port. It must be a port alias or integer between 1 and 65535"



  • “The following input errors were detected: is not a valid redirect target port. It must be a port alias or integer between 1 and 65535”

    I did internet searches and didn’t find a lot on this error .

    The selections made under NAT/Port Forward/Edit; the rest left at pfsense default

    • Interface: WAN
    • Protocol: TCP
    • Destination: WAN
    • Destination port range: 443
    • Redirect target IP: 192.168.2.100

    Background

    • pfsense router (version 2.4.3-RELEASE-p1 (amd64) ) with PIA VPN
    • webserver (192.168.2.100) that I want to port forward is in jail on freebsd host (192.168.2.50); each have separate IP addresses
    • the webserver works on LAN; I can access it via linux machine on LAN and it connects to internet as I have been installing apps from internet; the host can ping internet
    • the webserver has port port 443 connected and is listening on it
    • the route for webserver out to internet is:
      - from jail on freebsd box
      - to tp-link managed switch
      - to pfsense router via WAN (as default gateway) through to VPN
      - to ISP CPE

    I tried the following:

    • read the pfsense docs: https://www.netgate.com/docs/pfsense/nat/forwarding-ports-with-pfsense.html

    • checked out some basic pfsense guides/youtube videos on portforwarding just make sure I didn’t miss anything eg. https://www.youtube.com/watch?v=3-DU47zDrQk

    • Did the troubleshooting with https://www.netgate.com/docs/pfsense/nat/port-forward-troubleshooting.html

    • checked ports listening and connected on pfsense diagnostics – port 443 is active for various Ips on LAN

    • firewall not enabled on webserver at the moment

    • tried using the WAN and VPN gateway as a setting but still same result

    • ISP is not blocking the port being forwarded

    • the pfsense router is the way out to internet; nothing else in between; no captive portal employed

    • no floating rules or interface groups applied on pfsense router

    • WAN firewall rules do not have a gateway set

    • Upnp service is not activated on pfsense box

    • tested port 443 with “Test Port” on pfsens diagnostics –
      it passes the test when i go to server on internet eg. pfsense.org;
      it passes the test when i go to the pfsense router IP address and the switch IP address
      the test fails when I go to any other machine on the LAN

    Is it perhaps a firewall rule that would cause that error?
    What am I missing?



  • @freddyh said in Cannot port forward: "not a valid redirect target port. It must be a port alias or integer between 1 and 65535":

    The selections made under NAT/Port Forward/Edit; the rest left at pfsense default

    Interface: WAN
    Protocol: TCP
    Destination: WAN
    Destination port range: 443
    Redirect target IP: 192.168.2.100

    Strange, your are omitting the "Redirect target port" field.
    It should be

    Redirect target port : 443

    en then pfSense will accept your NAT rules :

    0_1534259842093_dfbacfd7-24b6-425f-a5c5-dfa51fc730d1-image.png



  • @gertjan said in Cannot port forward: "not a valid redirect target port. It must be a port alias or integer between 1 and 65535":

    @freddyh said in Cannot port forward: "not a valid redirect target port. It must be a port alias or integer between 1 and 65535":

    The selections made under NAT/Port Forward/Edit; the rest left at pfsense default

    Interface: WAN
    Protocol: TCP
    Destination: WAN
    Destination port range: 443
    Redirect target IP: 192.168.2.100

    Strange, your are omitting the "Redirect target port" field.
    It should be

    Redirect target port : 443

    en then pfSense will accept your NAT rules :

    0_1534259842093_dfbacfd7-24b6-425f-a5c5-dfa51fc730d1-image.png

    Gertjan

    Thanks so much. Problem solved. Its the small things that are overlooked.
    Its been a crap day solving problems that I didnt even see that one.

    Appreciated!