So I'm trying to achieve this:
My Phone ----Wireguard----> VPS (Running Tor Node) ---Tor---> Internet Host
So far I have set up wireguard successfully, in my VPS I have wg0 interface and I have Tor node running.
My /etc/tor/torrc :
Log notice file /var/log/tor/notices.log
Log info file /var/log/tor/info.log
VirtualAddrNetwork 10.192.0.0/10
AutomapHostsSuffixes .onion,.exit
AutomapHostsOnResolve 1
TransPort 9040
DNSPort 53
This is my iptables rules:
iptables -A FORWARD -i wg0 -j ACCEPT
iptables -t nat -A PREROUTING -i wg0 -p tcp --syn -j REDIRECT --to-ports 9040
iptables -t nat -A PREROUTING -i wg0 -p udp --dport 53 -j REDIRECT --to-ports 53
but traffic is not going through and there is no response when trying to open a webpage. Is there something wrong with iptables?
Thanks in advance