mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
urlfilter: use iptables/ip6tables -nL
This commit is contained in:
parent
4c7577bf1c
commit
6fd65dddc8
1 changed files with 4 additions and 4 deletions
|
|
@ -9,7 +9,7 @@ PROG=/usr/sbin/urlfilter
|
|||
|
||||
configure_firewall()
|
||||
{
|
||||
iptables -w -L FORWARD|grep -iqE "NFQUEUE"
|
||||
iptables -w -nL FORWARD|grep -iqE "NFQUEUE"
|
||||
if [ "$?" -ne 0 ]; then
|
||||
# setup netfilter queue 0, use queue bypass so that if no application is
|
||||
# listening to this queue then traffic is unaffected.
|
||||
|
|
@ -23,7 +23,7 @@ configure_firewall()
|
|||
# disable acceleration for https packet so that they can be read by urlfilter
|
||||
ebtables -A FORWARD -p ip --ip-protocol 6 --ip-destination-port 443 -j SKIPLOG
|
||||
fi
|
||||
ip6tables -w -L FORWARD|grep -iqE "NFQUEUE"
|
||||
ip6tables -w -nL FORWARD|grep -iqE "NFQUEUE"
|
||||
if [ "$?" -ne 0 ]; then
|
||||
#ip6table rules
|
||||
ip6tables -w -I FORWARD 1 -p tcp --dport 80 -j NFQUEUE --queue-num 0 --queue-bypass
|
||||
|
|
@ -54,7 +54,7 @@ start_service() {
|
|||
}
|
||||
|
||||
stop_service() {
|
||||
iptables -w -L FORWARD|grep -iqE "NFQUEUE"
|
||||
iptables -w -nL FORWARD|grep -iqE "NFQUEUE"
|
||||
if [ "$?" -eq 0 ]; then
|
||||
iptables -w -D FORWARD -p tcp --dport 80 -j NFQUEUE --queue-num 0 --queue-bypass
|
||||
iptables -w -D FORWARD -p tcp --dport 443 -j NFQUEUE --queue-num 0 --queue-bypass
|
||||
|
|
@ -64,7 +64,7 @@ stop_service() {
|
|||
iptables -w -D INPUT -p udp --sport 53 -j NFQUEUE --queue-num 0 --queue-bypass
|
||||
ebtables -D FORWARD -p ip --ip-protocol 6 --ip-destination-port 443 -j SKIPLOG
|
||||
fi
|
||||
ip6tables -w -L FORWARD|grep -iqE "NFQUEUE"
|
||||
ip6tables -w -nL FORWARD|grep -iqE "NFQUEUE"
|
||||
if [ "$?" -eq 0 ]; then
|
||||
#ip6table rules
|
||||
ip6tables -w -D FORWARD -p tcp --dport 80 -j NFQUEUE --queue-num 0 --queue-bypass
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue