Fetch from pfsense shell with different gateway



  • How can I specify to fetch which gateway I want to use to download a file?
    If I have three gateways, how to tell fetch which to use do download a file?


  • Rebel Alliance Developer Netgate

    You can't policy route traffic from the firewall itself, but you can set a source address which can nudge it.

    fetch --bind-address x.x.x.x https://blah
    

    Where x.x.x.x is the IP address of the WAN you want to use, for example:

    : fetch --bind-address x.x.x.x -qo - http://checkip.dyndns.org
    <title>Current IP Check</title>Current IP Address: x.x.x.x
    : fetch --bind-address y.y.y.y -qo - http://checkip.dyndns.org
    <title>Current IP Check</title>Current IP Address: y.y.y.y
    
    


  • ohhhh it works!

    I have tested the same command on FreeBSD and it doesn't work

    is fetch of pfsense different from FreeBSD fetch or what else?


  • Rebel Alliance Developer Netgate

    Same fetch, but our pf ruleset has some tricks with route-to that make it work.