• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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 411 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.
  • C
    crankshaft
    last edited by Jan 4, 2022, 6:20 AM

    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
      crankshaft
      last edited by Jan 4, 2022, 8:16 AM

      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
      • S
        stephenw10 Netgate Administrator
        last edited by Jan 4, 2022, 1:49 PM

        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
        3 out of 3
        • First post
          3/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received