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 255.255.255.255. 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: 100.100.100.172 subnet 255.255.255.128 gateway 100.100.100.129
    Second IP: 5.10.5.5.

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

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

    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:
    https://redmine.pfsense.org/issues/972

    Steve


Log in to reply