Friendly reject blocked clients

This commit is contained in:
Mygod
2019-08-27 23:24:23 +08:00
parent 4105ac19d6
commit df9cb6180a

View File

@@ -272,7 +272,7 @@ class Routing(private val caller: Any, private val downstream: String) : IpNeigh
transaction.execQuiet("$IPTABLES -N vpnhotspot_fwd") transaction.execQuiet("$IPTABLES -N vpnhotspot_fwd")
transaction.execQuiet("$IPTABLES -N vpnhotspot_acl") transaction.execQuiet("$IPTABLES -N vpnhotspot_acl")
transaction.iptablesInsert("FORWARD -j vpnhotspot_fwd") transaction.iptablesInsert("FORWARD -j vpnhotspot_fwd")
transaction.iptablesAdd("vpnhotspot_fwd -i $downstream ! -o $downstream -j DROP") // ensure blocking works transaction.iptablesAdd("vpnhotspot_fwd -i $downstream ! -o $downstream -j REJECT") // ensure blocking works
// the real forwarding filters will be added in Subrouting when clients are connected // the real forwarding filters will be added in Subrouting when clients are connected
} }