summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_MASQUERADE.txlate
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2022-04-12 21:19:39 +0200
committerPhil Sutter <phil@nwl.cc>2022-11-11 19:13:10 +0100
commitf30c5edce0413b2b2346c7f58e801f10f6e9bc5a (patch)
tree3af9c625b5f54d2016e8fe4f8a2dccaea0fd4cda /extensions/libipt_MASQUERADE.txlate
parent0c0807bed45568b458980e65691ec4482aeb1cf3 (diff)
extensions: Merge SNAT, DNAT, REDIRECT and MASQUERADE
REDIRECT was already merged into DNAT. Given the callback generator and generalized inner parsing routines, merging the other "flavors" is relatively simple. Rename the extension into "libxt_NAT.so" while doing so and turn the old DSOs into symlinks. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'extensions/libipt_MASQUERADE.txlate')
-rw-r--r--extensions/libipt_MASQUERADE.txlate9
1 files changed, 9 insertions, 0 deletions
diff --git a/extensions/libipt_MASQUERADE.txlate b/extensions/libipt_MASQUERADE.txlate
index 40b6958a..49f79d33 100644
--- a/extensions/libipt_MASQUERADE.txlate
+++ b/extensions/libipt_MASQUERADE.txlate
@@ -6,3 +6,12 @@ nft add rule ip nat POSTROUTING ip protocol tcp counter masquerade to :10
iptables-translate -t nat -A POSTROUTING -p tcp -j MASQUERADE --to-ports 10-20 --random
nft add rule ip nat POSTROUTING ip protocol tcp counter masquerade to :10-20 random
+
+iptables-translate -t nat -A POSTROUTING -p tcp -j MASQUERADE --random
+nft add rule ip nat POSTROUTING ip protocol tcp counter masquerade random
+
+iptables-translate -t nat -A POSTROUTING -p tcp -j MASQUERADE --random-fully
+nft add rule ip nat POSTROUTING ip protocol tcp counter masquerade fully-random
+
+iptables-translate -t nat -A POSTROUTING -p tcp -j MASQUERADE --random --random-fully
+nft add rule ip nat POSTROUTING ip protocol tcp counter masquerade random,fully-random