diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..3467727 Binary files /dev/null and b/.DS_Store differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dbe9c82 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/ \ No newline at end of file diff --git a/rt-mep/nftables.conf b/rt-mep/nftables.conf index a3917fe..7e09454 100644 --- a/rt-mep/nftables.conf +++ b/rt-mep/nftables.conf @@ -1,5 +1,4 @@ #!/usr/sbin/nft -f -# /etc/nftables.conf flush ruleset @@ -8,11 +7,15 @@ define LAN = eth1 define WAN = eth0 define LAN_SUBNET = 10.100.2.0/24 define WAN_IP = 45.139.163.92 - +define FRONT_HTTP = 10.100.2.254 +define RICK_VM = 10.100.2.252 table inet nat { chain prerouting { type nat hook prerouting priority 0; + iifname $WAN tcp dport {80, 443, 2222, 2223} dnat ip to $FRONT_HTTP; + iifname $WAN udp dport {443} dnat ip to $FRONT_HTTP; + iifname $WAN tcp dport {62142,62169,62420} dnat ip to $RICK_VM; } chain postrouting { @@ -40,4 +43,4 @@ table inet filter { chain output { type filter hook output priority 0; } -} +} \ No newline at end of file