Add custom iptables rule

Hello. How can I add custom iptables rule, which be saved after reboot(persistent)?
I tried to add it using adb root and creating /system/etc/init/iptables.rc(i think it is not the best way):

service iptables /system/bin/iptables -t filter -I OUTPUT -p udp --dport 443 -j DROP
    user system
    group system
    oneshot
    console /system/bin/sh
    seclabel u:object_r:system_file:s0

But it doesn’t working(due to SELinux error). Any ideas?

This topic was automatically closed after 90 days. New replies are no longer allowed.