How to configure a gateway which is not in the interface subnet?

  • Hi there,

    I hope I choose right forum. I had been running a debian NAT server inside a vsphere esx environment for a while but I am planning to move to pfsense. Now my problem:

    My second external IP used for the routing-vm has a ip with a subnetmask The routing is done via the default gateway of the first external IP which is in the same subnet as the gateway. But this IP is used as the vm-management ip
    Example: subnet gateway
    Second IP:

    Within debian it worked directly configured:
    auto eth0
    iface eth0 inet static
    post-up ip route add dev eth0
            post-up ip route add default via

    On a testsystem with FreeBSD I got it working with this rc.conf:
    interface_em0="inet netmask"
    static_routes="gateway default"
    route_gateway=" -iface em0"

    Now with pfsense I can't figure out how to do this via the webgui. Every time the gui is complaining that the gateway is not within subnet of WAN Interface which is quite correct as my ISP has it configured so. How can I configure pfsense to do the magic thing?

  • Netgate Administrator

    There is no way to do it from the webgui. The configuration is invalid but more and more ISPs are starting to use similar setups. See:


Log in to reply