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

    Execute console command using specific interface or local IP address

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 2 Posters 462 Views 2 Watching
    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.
    • C Offline
      crankshaft
      last edited by

      Is it possible to force a command to use a specific interface or a tunnel IP address when using the console ??

      Lets say I have installed a 3rd party app that downloads files, and I want it to use tun_wgo rather than directly using the WAN interface for the app to connect through ?

      This app does support using a proxy, but I cannot figure out how / if I can create a local proxy the is essentially the tun_wg0 tunnel ??

      Many Thanks

      1 Reply Last reply Reply Quote 0
      • C Offline
        crankshaft
        last edited by

        I think socat might be the solution but I cannot figure out the syntax.

        When you execute ping, you can use the -S x.x.x.x option to ping via that address, what I am looking for is to be able to to execute any command and be able to specify the IP or network interface in a similar way that ping allows.

        1 Reply Last reply Reply Quote 0
        • stephenw10S Offline
          stephenw10 Netgate Administrator
          last edited by

          You are running thing on the firewall directly? And the application itself does not support binding to a specific address?

          Something that runs as a proxy and does allow binding to one source IP might allow that. Not something I've ever tried though. If you ran it on something behind the firewall you could just policy route it.

          Steve

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