by CogitoCogito · 5y ago · 0 comments
Would this be easy to combine with openvpn? Basically what I'd like is to hook (say) my Apple TV into my pi by ethernet and then use the pi's wifi to connect to my router. Finally I'd like to be able to connect the pi to a VPN and have the Apple TV transparently use that connection. Is this straight-forward to achieve?
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT
iptables -A FORWARD -i wlan0 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
I'd recommend wireguard[0] in preference to openvpn.refs: [0]https://www.wireguard.com/
https://www.digitalocean.com/community/tutorials/how-to-crea...
etc. I'd also second a recommendation of wireguard over OpenVPN - it's far simpler to configure too.
Performance is probably the only reason you'd favor bridging over routing. A segmented network is a safer network.
Your issue might be different but I suggest taking a pcap to make sure your assumptions about what is answering a given DNS query are true.
So, you're not alone, me too.