tinctunnel
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tinctunnel [2020/07/16 07:07] – neoon | tinctunnel [2021/11/25 22:42] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| You should already have a Tinc tunnel running between these 2 machines: | You should already have a Tinc tunnel running between these 2 machines: | ||
| [[tincvpn_setup|TincVPN Setup]] \\ | [[tincvpn_setup|TincVPN Setup]] \\ | ||
| - | To ensure that data is getting forwarded to the gateway and back \\ | + | To ensure that data is getting forwarded to the gateway and back (Client) |
| - | **Run this on the client** | + | |
| echo '100 TUNNEL' | echo '100 TUNNEL' | ||
| ip rule add from 10.0.0.0/24 table TUNNEL | ip rule add from 10.0.0.0/24 table TUNNEL | ||
| ip route add default via 10.0.0.1 table TUNNEL | ip route add default via 10.0.0.1 table TUNNEL | ||
| | | ||
| - | **Forward traffic | + | **Forward traffic |
| - | | + | |
| + | iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE | ||
| + | echo 1 > / | ||
| + | **Forward | ||
| iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | ||
| iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE | iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE | ||
| - | | + | |
| - | iptables -A INPUT -i eth0 -m state --state RELATED, | + | |
| - | iptables -A INPUT -i tun0 -m state --state RELATED, | + | |
| - | # Forward everything | + | |
| - | iptables -A FORWARD -j ACCEPT | + | |
| | | ||
| **Test it** | **Test it** | ||
| curl http:// | curl http:// | ||
| | | ||
| - | Sources: https:// | + | [[proxmox_tunnel_bridge_via_tinc| Tunnel bridge via Tinc VPN]] |
| + | |||
| + | Sources:\\ https:// | ||
| https:// | https:// | ||
tinctunnel.1594883276.txt.gz · Last modified: 2021/11/25 22:43 (external edit)
