Actions

Redirect Whonix-Workstation Ports or Unix Domain Socket Files to Whonix-Gateway

From Whonix


Redirect12123.png

Introduction[edit]

Port or unix domain socket file redirection could be useful for any future applications that expect Tor or the ControlPort to listen on any specific port or unix domain socket file that is not (yet) added to anon-ws-disable-stacked-tor build-ins [archive] or config [archive] by default, or for any other port or unix domain socket file redirections from the workstation to the gateway.

Instructions[edit]

To create a port or unix domain socket file, it is required to create and extend config file /etc/anon-ws-disable-stacked-tor.d/50_user.conf. [1]

Inside Whonix-Workstation ™.

Note: Qubes-Whonix users should use folder /etc/anon-ws-disable-stacked-tor.d rather than folder /usr/local/etc/anon-ws-disable-stacked-tor.d/ and apply this in whonix-ws-16 TemplateVM. [2]

Create folder /usr/local/etc/anon-ws-disable-stacked-tor.d/.

sudo mkdir -p /usr/local/etc/anon-ws-disable-stacked-tor.d

Open file /usr/local/etc/anon-ws-disable-stacked-tor.d/50_user.conf in an editor with root rights.

(Qubes-Whonix ™: In TemplateVM)

This box uses sudoedit for better security [archive]. This is an example and other tools could also achieve the same goal. If this example does not work for you or if you are not using Whonix, please refer to this link.

sudoedit /usr/local/etc/anon-ws-disable-stacked-tor.d/50_user.conf

Then either add a port redirection.

For example to redirect Whonix-Workstation ™ port 9100 to Whonix-Gateway ™ port 9050. Note: adjust the port numbers for your needs.

file_port_tuples+=" port#9100:9050 "

Or create a unix domain socket file /var/run/anon-ws-disable-stacked-tor/unix-domain-socket-file.sock and have it forwarded to Whonix-Gateway ™ port 9050.

file_port_tuples+=" /var/run/anon-ws-disable-stacked-tor/unix-domain-socket-file.sock#9050 "

Save.

Run the systemd-socket-proxyd systemd-unit-files-generator. [3]

sudo /usr/lib/anon-ws-disable-stacked-tor/systemd-unit-files-generator

The process of creating a redirection is now complete.

Testing[edit]

To test /var/run/anon-ws-disable-stacked-tor/unix-domain-socket-file.sock, you could use:

socat - UNIX-CONNECT:/var/run/anon-ws-disable-stacked-tor/unix-domain-socket-file.sock

Then type:

GET

Then press <enter>.

The expected reply includes Tor is not an HTTP Proxy.

Footnotes[edit]

  1. https://github.com/Whonix/anon-ws-disable-stacked-tor/blob/master/etc/anon-ws-disable-stacked-tor.d/30_anon-dist.conf [archive]
  2. The missing Qubes-Whonix feature is that /usr/lib/anon-ws-disable-stacked-tor/systemd-unit-files-generator doesn't run at boot time and that files generated by /usr/lib/anon-ws-disable-stacked-tor/systemd-unit-files-generator don't persist after reboot of a TemplateBasedVM.
  3. https://github.com/Whonix/anon-ws-disable-stacked-tor/blob/master/usr/lib/anon-ws-disable-stacked-tor/systemd-unit-files-generator [archive]


Fosshost is sponsors Kicksecure ™ stage server Whonix old logo.png
Fosshost About Advertisements

Search engines: YaCy | Qwant | ecosia | MetaGer | peekier | Whonix ™ Wiki


Follow: 1024px-Telegram 2019 Logo.svg.png Iconfinder Apple Mail 2697658.png Twitter.png Facebook.png Rss.png Reddit.jpg 200px-Mastodon Logotype (Simple).svg.png

Support: 1024px-Telegram 2019 Logo.svg.png Discourse logo.png Matrix logo.svg.png

Donate: Donate Bank Wire Paypal Bitcoin accepted here Monero accepted here Contriute

Whonix donate bitcoin.png Monero donate Whonix.png United Federation of Planets 1000px.png

Twitter-share-button.png Facebook-share-button.png Telegram-share.png link=mailto:?subject=Redirect Whonix-Workstation Ports or Unix Domain Socket Files to Whonix-Gateway&body=https://www.whonix.org/wiki/Redirect_Whonix-Workstation_Ports_or_Unix_Domain_Socket_Files_to_Whonix-Gateway link=https://reddit.com/submit?url=https://www.whonix.org/wiki/Redirect_Whonix-Workstation_Ports_or_Unix_Domain_Socket_Files_to_Whonix-Gateway&title=Redirect Whonix-Workstation Ports or Unix Domain Socket Files to Whonix-Gateway link=https://news.ycombinator.com/submitlink?u=https://www.whonix.org/wiki/Redirect_Whonix-Workstation_Ports_or_Unix_Domain_Socket_Files_to_Whonix-Gateway&t=Redirect Whonix-Workstation Ports or Unix Domain Socket Files to Whonix-Gateway link=https://mastodon.technology/share?message=Redirect Whonix-Workstation Ports or Unix Domain Socket Files to Whonix-Gateway%20https://www.whonix.org/wiki/Redirect_Whonix-Workstation_Ports_or_Unix_Domain_Socket_Files_to_Whonix-Gateway&t=Redirect Whonix-Workstation Ports or Unix Domain Socket Files to Whonix-Gateway

Are you proficient with iptables? Want to contribute? Check out possible improvements to iptables. Please come and introduce yourself in the development forum.

https link onion link Priority Support | Investors | Professional Support

Whonix | © ENCRYPTED SUPPORT LP | Heckert gnu.big.png Freedom Software / Osi standard logo 0.png Open Source (Why?)

The personal opinions of moderators or contributors to the Whonix ™ project do not represent the project as a whole.

By using our website, you acknowledge that you have read, understood and agreed to our Privacy Policy, Cookie Policy, Terms of Service, and E-Sign Consent.