Tell tor relay to use specific IP when acting as a exit

Hello I have multiple IPs on my server and would like to tell tor to use a specific IP as its exit IP instead of trying to use both all IPs it has access to

Use OutboundBindAddress config option.
Description can be found here (Use Ctrl + F to search the page)

OutboundBindAddress IP
Make all outbound connections originate from the IP address specified. This is only useful when you have multiple network interfaces, and you want all of Tor’s outgoing connections to use a single one. This setting will be ignored for connections to the loopback addresses (127.0.0.0/8 and ::1).

Please refer to the manual for more options using CLI man tor or debian online manpages

Hi!

Here’s the all IP configurations you can specify in your torrc [tor configuration file].

Address is used to specify where your TOR relay can be reached what public IP it has:

Address PUT.IPv4.here.
Address [PUT:IPv6:here]

OutboundBindAddress is used to specify exact public IP address you want to router your traffic with [mostly used if TOR relay server has more than one IPv4 or IPv6 address.

OutboundBindAddress PUT.IPv4.here.
OutboundBindAddress [PUT:IPv6:here]

It doesn’t work properly in all casses it mostly works if for example your VPS has directly public IP address bound to the NIC.

ORPort Put.IPv4.here.:yourport
ORPort [Put:IPv6:here]:yourport

If you’re running an Exit relay and want to use “DirPortFrontPage” to display HTML notification file explaining what’s a TOR Exit relay when anyone visit public IP address of your relay, It’s also good to specify DirPort.

This option will only work if you’ve downloaded "tor-exit-notice.html file into your \etc\tor folder.

First you have to make sure if wget is installed on your systerm with the following command:
sudo which wget

if this command doesn’t return location where is wget stored on your system, you can download and install wget wit this command:

sudo apt install wget

Now you can use your wget to download the tor-exit-notice.html file into your /etc/tor folder.

First navigate to your /etc/tor folder with this command:
cd /etc/tor

Then download the tor-exit-notice.html file into the selected folder with this command:

sudo wget This is a Tor Exit Router

DirPort Put.IPv4.here:80
DirPort [Put:IPv6:here]:80 NoAdvertise

Keep in mind you have to specify “NoAdvertise” for IPv6 of your DirPort as TOR cannot display this notification page on both IP version protocols.

More tutorials about installing and configuring all TOR relays can be found here:

For some reason I’m unable to post direct links in this reply so you have to edit the link and replace all [dot] with an actual dot .

Exit relay: community[dot]torproject[dot]org/relay/setup/exit/
Middle\Guard relay: community[dot]torproject[dot]org/relay/setup/guard/
Most popular bridge: community[dot]torproject[dot]org/relay/setup/bridge/

Okay? I want tor to only use one of my IPv4 IPs to use for exiting. I can’t afford to have all my IPs blocked. This seems to only tell it what IPs to listen on

OutboundBindAddress should be your solution.