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: [] nameservers: addresses: [,] version: 2

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

subnet netmask { range; }

my torrc is CookieAuthentication 1 Log notice file /var/log/tor/notices.log VirtualAddrNetwork AutomapHostsSuffixes .onion,.exit AutomapHostsOnResolve 1 TransPort 9040 TransListenAddress DNSPort 53 DNSListenAddress 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 UG 100 0 0 eth0 U 0 0 0 eth0 _gateway UH 100 0 0 eth0 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.