opnsense / plugins

OPNsense plugin collection
https://opnsense.org/
BSD 2-Clause "Simplified" License
810 stars 593 forks source link

Tor: Select interfaces for OutboundBindAddress #3968

Open MikeBishop opened 1 month ago

MikeBishop commented 1 month ago

Important notices Before you add a new report, we ask you kindly to acknowledge the following:

Is your feature request related to a problem? Please describe. I would like all of Tor's outbound connections to originate from the IP addresses I'm using for incoming connections to it. This both improves the separation between the Tor relay and the addresses used for client traffic on my network, and makes it possible to apply bandwidth management on the Tor traffic.

However, it seems to select from any of the IP addresses on the OPNsense device. The current plugin allows entering fixed addresses to be used in the OutboundBindAddress directive, but as my addresses are assigned by DHCP and RA, they change periodically (especially the v6 prefix).

Describe the solution you'd like I would like a way to select either an interface whose assigned address will be used, or a "Dynamic IPv6 Host" alias which will get updated when a new v6 prefix is allocated.

Describe alternatives you've considered I've considered adding these lines to the configuration file via a script on address change, though that's fragile as the file can be regenerated at any point. (I'm also having difficulty finding a reliable way to trigger a script on address changes.)

Additional context Add any other context or screenshots about the feature request here.