Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung | Nächste Überarbeitung Beide Seiten, nächste Überarbeitung | ||
admin_grundlagen:netzwerk [2019/02/18 03:32] ingo_wichmann [Wie ist der Durchsatz?] |
admin_grundlagen:netzwerk [2020/01/23 12:16] ingo_wichmann |
||
---|---|---|---|
Zeile 27: | Zeile 27: | ||
ip link set dev eth2 up | ip link set dev eth2 up | ||
ip route add default via 192.168.1.1 dev eth2 | ip route add default via 192.168.1.1 dev eth2 | ||
- | iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE | ||
sysctl -w net.ipv4.ip_forward=1 | sysctl -w net.ipv4.ip_forward=1 | ||
+ | |||
+ | === NAT mit iptables === | ||
+ | iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE | ||
+ | |||
+ | === NAT mit nftables === | ||
+ | nft add table ip nat | ||
+ | nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100; policy accept; } | ||
+ | nft add rule ip nat POSTROUTING counter masquerade | ||
====== Checkliste Netzwerk ====== | ====== Checkliste Netzwerk ====== |