Problem with static routes/gateway on another subnet

  • Hey guys,

    I'm currently having some issues with the way my dedicated server host manages extra IPs.

    I'm running it under ESXi, the host has the address, with a gateway of .

    My WAN interface, em0, has the address My gateway however must be set as

    In order to do this I have a route set up like this:

    route add -net -iface em0
    route add default

    This works, but however once I restart my pfsense machine the routes no longer exist. I've tried adding them using the web interface but it doesn't seem to work, nor with adding it to the config.xml with shellcmd.

    Any ideas how I can have these routes/gateways set upon boot?

    Thanks in advance.

  • Hi,

    based on Online documentation, you have to change netmask to /32 too…

    To have all theses settings saved on reboot, you will have to change the /conf/config.xml file of your pfsense VM.
    You can change the netmask in the interface definition :<interfaces><wan></wan></interfaces>

    You have to add the two following lines just before

    <shellcmd>route add -net -iface em0</shellcmd>
    <shellcmd>route add default</shellcmd>

    Hope this helps…

Log in to reply