NAT - Source Port - Range



  • I defined the Source Port Range from 9000 to 9900….. Port forwarding works fine for port 9000 and rest of the ports it is ignored.....

    GUI has the facility to enter Range.... but it does not work.... why ? Any reasons.... or any patches ?



  • Show us the relevant rules from /tmp/rules.debug so we can verify that it is created correctly.



  • for port forwarding you normaly don't set the sourche port only the destination port
    source ports are random



  • @sullrich:

    Show us the relevant rules from /tmp/rules.debug so we can verify that it is created correctly.

    Entry in /tmp/rules.debug

    System Aliases

    ng0 = "{ rl0 ng0 }"
    wan = "{ rl0 ng0 }"

    #NAT Inbound Redirects
    rdr on ng0 proto tcp from any to any port 2000:5000 -> 192.168.19.160 port 3000:*

    http://wanip: <port>-> it should get redirected to http://192.168.19.160:3000 where <port>user can enter anything, it should redirected to 3000 of the IP specified. (This IP is part of the lan of the device)

    but, I found 2000 maps to 3000 and 5000 maps to 6000….. one to one match.....</port></port>



  • That is correct behaviour. You can shift ports with it but not redirect a range of ports to the same port.


Log in to reply