0

I'm trying to set up a machine with two net interfaces

eth0 connected to the internet router eth1 connected to a switch with other machines

I would like to route all traffic transparently for other machines.

My netplan is network: ethernets: eth0: addresses: [] dhcp4: true optional: true eth1: dhcp4: no addresses: [192.168.100.1/24] nameservers: addresses: [208.67.222.222,208.67.220.220] version: 2

I've installed isc-dhcp-server my configuration is default-lease-time 600; max-lease-time 7200; option subnet-mask 255.255.255.0; option broadcast-address 192.168.100.255; option routers 192.168.100.1; option domain-name-servers 192.168.100.1; option domain-name "constellation";

subnet 192.168.100.0 netmask 255.255.255.0 { range 192.168.100.100 192.168.100.200; }

my torrc is CookieAuthentication 1 Log notice file /var/log/tor/notices.log VirtualAddrNetwork 10.192.0.0/10 AutomapHostsSuffixes .onion,.exit AutomapHostsOnResolve 1 TransPort 9040 TransListenAddress 192.168.100.1 DNSPort 53 DNSListenAddress 192.168.100.1 ControlPort 9051

and my iptables are sudo iptables -F sudo iptables -t nat -F sudo iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 22 -j REDIRECT --to-ports 22 sudo iptables -t nat -A PREROUTING -i eth1 -p udp --dport 53 -j REDIRECT --to-ports 53 sudo iptables -t nat -A PREROUTING -i eth1 -p tcp --syn -j REDIRECT --to-ports 9040

and my /proc/sys/net/ipv4/ip_forward is set to 1

this is my route

Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default _gateway 0.0.0.0 UG 100 0 0 eth0 10.120.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 _gateway 0.0.0.0 255.255.255.255 UH 100 0 0 eth0 192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1

What i've miss? why i cannot browser ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.