4 ms·
It turns out this is kind of already in the Linux Kernel. See here: https://lwn.net/Articles/614348/ https://lwn.net/Articles/614348/ You can tunnel TCP / IP /
by sargun 11y ago
It turns out this is kind of already in the Linux Kernel. See here: https://lwn.net/Articles/614348/ https://lwn.net/Articles/614348/
You can tunnel TCP / IP / GRE, reasonably even Ethernet itself over UDP. This is actually really interesting for cases where you want layer 2 bridging over the internet without all the complexity and overhead of a VPN.
- aexaey 11y agoWouldn't work directly here, as "ip fou add" reserves a local port, while in OP's case it's a reserved remote port. And reserving local port 53 in case of 53<->53 packets would kill dns resolution. With an extra iptables rule should work though: iptables -t nat -A PREROUTING -s my.server -p udp --sport 53 -d DNAT --to 127.0.0.1:5555 ip fou add port 5555 ipproto 4
- __michaelg 11y agoAgreed. The same is true for VXLAN which is also in the Kernel and also runs over UDP.