OpenWRT-iptables is a simple iptables and ip6tables startup script
for OpenWRT. It is an alternative to OpenWRT's default fw3 firewall
management tool.
-
Copy
init.d/iptablesto/etc/init.d/. Make sure that it is executable. -
Symlink
/etc/init.d/ip6tablestoiptables. -
Create a directory —
/etc/sysconfig. -
Copy
sysconfig/iptablesandsysconfig/ip6tablesto/etc/sysconfig/. -
Disable the default
firewallservice and enable the new services.service firewall disableservice iptables enableservice ip6tables enable
-
Reboot.
NOTE: The default configuration only allows inbound connections to TCP port 22 (
ssh); IP forwarding and NAT are disabled. It may be necessary to customize the configuration files before enabling the new services.Proceed with caution to avoid losing access to your WAP/router.
The service script supports two additional commands:
-
save— Saves current rules to/etc/sysconfig/iptables(or/etc/sysconfig/ip6tables). -
dump— Writes current rules tostdout.