Skip to content

Korzystanie z Tor przez port LAN

Oprogramowanie układowe Tor pobrane z naszej strony kieruje do sieci Tor tylko połączenia z SSID – „Tor”. Aby kierować do sieci Tor wszystkie połączenia z LAN, trzeba powielić konfigurację. Poniżej znajdziesz szczegółową instrukcję.

_**

**_

Połącz się z routerem przez SSH i zmodyfikuj poniższe skrypty, a następnie uruchom router ponownie. Możesz połączyć się z routerem przez SSH po podłączeniu do SSID: openwrt.

Jeśli ustawiono hasło, użyj SSH:

$ ssh root@192.168.1.1

Jeśli nie ustawiono hasła, użyj telnet

$ telnet 192.168.1.1

/etc/config/network

Zakomentuj czerwone wiersze i dodaj zielone wiersze

config interface ‘lan’
#       option ifname ‘eth1’
option force_link ‘1’
#       option type ‘bridge’
option proto ‘static’
option ipaddr ‘192.168.1.1’
option netmask ‘255.255.255.0’
option ip6assign ’60’

config interface ‘tor1’
option ifname ‘eth1’
option proto ‘static’
option ipaddr ‘172.16.2.1’
option netmask ‘255.255.255.0’

/etc/config/dhcp

Dodaj poniższe wiersze

config dhcp ‘tor1’
option interface tor1
option start 100
option limit 150
option leasetime 1h
option ra server

/etc/config/firewall
Dodaj wszystkie poniższe sekcje
config zone

option name ‘tor1’

option network ‘tor1’

option input ‘REJECT’

option output ‘ACCEPT’

option forward ‘REJECT’

option conntrack ‘1’

config rule

option name ‘Allow-Tor-DHCP’

option src ‘tor1’

option proto ‘udp’

option dest_port ’67’

option target ‘ACCEPT’

option family ‘ipv4’

config rule

option name ‘Allow-Tor-DNS’

option src ‘tor1’

option proto ‘udp’

option dest_port ‘9053’

option target ‘ACCEPT’

option family ‘ipv4’

config rule

option name ‘Allow-Tor-Transparent’

option src ‘tor1’

option proto ‘tcp’

option dest_port ‘9040’

option target ‘ACCEPT’

option family ‘ipv4’

config rule

option name ‘Allow-Tor-SOCKS’

option src ‘tor1’

option proto ‘tcp’

option dest_port ‘9050’

option target ‘ACCEPT’

option family ‘ipv4’

/etc/firewall.user

Dodaj zielone wiersze


enable_transparent_tor() {
iptables -t nat -A PREROUTING -i wlan0-1 -p udp –dport 53 -j REDIRECT –to-ports 9053
iptables -t nat -A PREROUTING -i wlan0-1 -p tcp –syn -j REDIRECT –to-ports 9040
iptables -t nat -A PREROUTING -i eth1 -p udp –dport 53 -j REDIRECT –to-ports 9053
iptables -t nat -A PREROUTING -i eth1 -p tcp –syn -j REDIRECT –to-ports 9040

}

enable_transparent_tor

/etc/tor/torrc

Dodaj zielone wiersze

User tor
VirtualAddrNetwork 10.192.0.0/10
TransPort 9040
TransListenAddress 172.16.1.1
TransListenAddress 172.16.2.1
DNSPort 9053
DNSListenAddress 172.16.1.1
DNSListenAddress 172.16.2.1

About GL.iNet

Founded in 2010, GL.iNet is a leading provider of innovative routers and networking solutions. From compact travel routers to cutting-edge remote KVMs, GL.iNet delivers award-winning networking technology designed for performance and security.

GL.iNet gives people and organizations the power to connect with confidence. By putting control in the hands of users, GL.iNet supports the productivity and collaboration that shape a Good Life.

Next article GL.iNet 6416 ze źródłem czasu PPS/GPS/NTP

Compare products

{"one"=>"Select 2 or 3 items to compare", "other"=>"{{ count }} of 3 items selected"}

Select first item to compare

Select second item to compare

Select third item to compare

Compare