Учебные материалы 📑

m2 Задание 8.txt

===HQ-RTR===

nft add chain nat prerouting { type nat hook prerouting priority dstnat \; }

nft add rule nat prerouting iif "enp7s1" tcp dport 2011 dnat to 192.168.1.10

nft add rule nat prerouting iif "enp7s1" tcp dport 8081 dnat to 192.168.1.10:80

nft list ruleset

nft list ruleset > /etc/nftables/nftables.nft

systemctl restart nftables

nft list ruleset
================================

===BR-RTR===

nft add chain nat prerouting { type nat hook prerouting priority dstnat \; }

nft add rule nat prerouting iif "enp7s1" tcp dport { 8081, 2011 } dnat to 192.168.3.10

nft list ruleset

nft list ruleset > /etc/nftables/nftables.nft

systemctl restart nftables

nft list ruleset

================================