Search
Write a publication
Pull to refresh
1
0
Send message

vi /opt/etc/ndm/netfilter.d/tpws.sh

#!/bin/sh

[ "$type" == "ip6tables" ] && exit 0   # check the protocol type in backward-compatible way
[ "$table" != "nat" ] && exit 0   # check the table name

iptables -t nat -I PREROUTING -i br0 -p tcp --dport 80 -j REDIRECT --to-port 999
iptables -t nat -I PREROUTING -i br0 -p tcp --dport 443 -j REDIRECT --to-port 999

chmod +x /opt/etc/ndm/netfilter.d/tpws.sh

Проверить, что правила не слетают после обновления цепочек:

iptables -vL PREROUTING -t nat

Information

Rating
Does not participate
Registered
Activity