Vincule o soquete de escuta e as conexões de saída a esse endereço de interface de rede.
rtorrent -b a.b.c.d
Bloqueia todas as portas exceto a faixa de porta de 49164 a 49164 (intervalo de porta padrão)
iptables -A INPUT -i "Interface (ex. tun1)" -j DROP
iptables -A OUTPUT -i "Interface (ex. tun1)" -j DROP
iptables -A FORWARD -i "Interface (ex. tun1)" -j DROP
iptables -A INPUT -p tcp --sport 49164:49164 --dport 49164:49164 -i "Interface (ex. tun1)" -j ACCEPT
iptables -A INPUT -p udp --sport 49164:49164 --dport 49164:49164 -i "Interface (ex. tun1)" -j ACCEPT
iptables -A OUTPUT -p tcp --sport 49164:49164 --dport 49164:49164 -i "Interface (ex. tun1)" -j ACCEPT
iptables -A OUTPUT -p udp --sport 49164:49164 --dport 49164:49164 -i "Interface (ex. tun1)" -j ACCEPT
ou
iptables -A INPUT -i "Interface (ex. tun1)" -j ACCEPT
iptables -A OUTPUT -i "Interface (ex. tun1)" -j DROP
iptables -A FORWARD -i "Interface (ex. tun1)" -j DROP
iptables -A OUTPUT -p tcp --sport 49164:49164 --dport 49164:49164 -i "Interface (ex. tun1)" -j ACCEPT
iptables -A OUTPUT -p udp --sport 49164:49164 --dport 49164:49164 -i "Interface (ex. tun1)" -j ACCEPT
ou para um usuário específico
iptables -A INPUT -i "Interface (ex. tun1)" -j ACCEPT
iptables -A OUTPUT -i "Interface (ex. tun1)" -j DROP
iptables -A FORWARD -i "Interface (ex. tun1)" -j DROP
iptables -A OUTPUT -o "Interface (ex. tun1)" -m owner --uid-owner "USER UID (ex. 2021) or USER NAME (ex. ithenrik)" -j REJECT
link
link