summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_REDIRECT.txlate
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2022-03-17 14:42:51 +0100
committerPhil Sutter <phil@nwl.cc>2022-04-08 18:00:42 +0200
commit72d542b69ae2f780d9c9307231dcc3a2e3bed3b7 (patch)
tree2c12162c84a5dde3818852cf19c95f651abfe63e /extensions/libipt_REDIRECT.txlate
parent14d77c8aa29a7b361d7830e40a7f75a05b29f717 (diff)
extensions: Merge REDIRECT into DNAT
Code is very similar, join them to reuse parsing code at least. As a side-effect, this enables parsing of service names for ports in DNAT as well as using port number 0 as that's what REDIRECT allows. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'extensions/libipt_REDIRECT.txlate')
-rw-r--r--extensions/libipt_REDIRECT.txlate5
1 files changed, 0 insertions, 5 deletions
diff --git a/extensions/libipt_REDIRECT.txlate b/extensions/libipt_REDIRECT.txlate
deleted file mode 100644
index 815bb771..00000000
--- a/extensions/libipt_REDIRECT.txlate
+++ /dev/null
@@ -1,5 +0,0 @@
-iptables-translate -t nat -A prerouting -p tcp --dport 80 -j REDIRECT --to-ports 8080
-nft add rule ip nat prerouting tcp dport 80 counter redirect to :8080
-
-iptables-translate -t nat -A prerouting -p tcp --dport 80 -j REDIRECT --to-ports 8080 --random
-nft add rule ip nat prerouting tcp dport 80 counter redirect to :8080 random