How to set up Static/Persistent routes.

  • I have a subnet of public IPs

    What my colo does is they route all requests for to which is the IP of my router. Behind the router I have a private network
    I want to map public IPs from to my private IPs as in: -> -> ->
    How can I accomplish this in PFsense?
    So any time someone accesses from the outside, the router transparently routes them to on the private network. Of course when initiates a request to the outside, the router maps them to Same goes for any other IP.

    If I were to write those rules out in iptables, here is how I would have done it:
    given eth1 is the outside interface.
    iptables -t nat -I PREROUTING -i eth1 -d -s 0/0 -j DNAT --to
    iptables -t nat -I POSTROUING -o eth1 -s -j SNAT --to-source

    I hope if makes sense. Thanks for any help.

  • Unless I am missing something, this is vanilla 1:1 NAT.  STF for info on that.

  • That's what I figured, but I can't get it to work.
    For instance I have this in my NAT 1:1 right now:
    trying to map to
    but when I ping I get no results. Also I am running tcpdump icmp -n on to see if those icmp packets make it past the router, but I don't see anything.

  • What know what, this:
    has solved one problem: going from inside out. In other words when initiates a request to the outside world, everyone sees it as now. That worked and it's great.
    I guess what I have left to figure out is how to route all request to from outside to

  • So you're saying that you can successfully browse the web, etc, from now? If so, then it sounds like all you need to do now is set up your firewall rules. On the interface where your public IPs lie (WAN?) you need to set up rules to allow the incoming traffic. The destination will be the LAN address and port(s). To see an example, add a regular port forward and let it generate the firewall rules automatically, then look at the rule it generates and use it as a guide.

Log in to reply