Default route on wrong interface

  • I'm trying to set of a firewall for my Lan.

    The machines on my lan are all on the network.
    The default gateway is my ISPs router at
    I have pfsense running on a box that has two interfaces, fxp0 which connects to the lan and fxp1 that connects to the WAN.

    Here is the relevant part of config.xml:

    • <interfaces>- <lan><if>fxp0</if>
    • <wan><if>fxp1</if>

    Anyway, while I've been setting up the box, I've had it set up so that fxp0 can talk to both my LAN and my ISP router by plugging the pfsense's fxp0 into a switch that had both networks connected.

    When I got my configuration pretty much set up, I plugged the ISP's router into fxp1. At that point, the pfsense box could no longer talk to anything outside the network. I did a netstat -rn and found out that the gateway was set up on the fxp0 interface. How do I make the default route code to the fxp1 interface?

  • I found the problem or at least an easy work around.
    If I make fxp0 the WAN and fxp1 the LAN. The pfsense automatically assigns the default gateway to the WAN (fxp0).
    It strikes me that this isn't all that intuitive.
    I think one of these options (or something similar) should be done:

    1. Modify the setup pages so they recommend you use fxp0 for the WAN instead of fxp1.
    2. Modify the rc.interfaces_* scripts so that they set explicitly set the interface when running ifconfig for the default gateway to the interface of the WAN.
    3. Modify the UI and the rc.interfaces scripts to explicitly specify the interface for the default gateway.

Log in to reply