Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Fetch from pfsense shell with different gateway

    Scheduled Pinned Locked Moved Routing and Multi WAN
    4 Posts 2 Posters 951 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tonysud
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        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
        
        

        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • T
          tonysud
          last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

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

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.