EFW Support

Support => General Support => Topic started by: gkos on Friday 30 November 2012, 04:51:33 am



Title: place for custom firewall rules
Post by: gkos on Friday 30 November 2012, 04:51:33 am
Does anyone know where can I add my custom iptables or ebtables rules, so every time the firewall is reinitiated they are also executed?



Title: Re: place for custom firewall rules
Post by: cocoalcazar on Friday 24 January 2014, 01:53:26 am
Try :

/var/efw/firewall



Title: Re: place for custom firewall rules
Post by: kieronrob on Wednesday 05 February 2014, 05:43:35 am
This shows where to place custom rules:

http://help.endian.com/entries/25391848-How-to-split-a-zone-in-sub-zones


Title: Re: place for custom firewall rules
Post by: kikilinux on Thursday 06 February 2014, 05:17:05 am
very simple

cd /var/efw/inithooks/
nano rc.firewall.local

- write ur custom rules in this file just like my file with the following format :

#!/bin/bash
# See how we were called.
case "$1" in
start)
## add your 'start' rules here
# Rules to bind a subnet to an interface/vlan

        iptables -t nat -A CUSTOMPREROUTING -d 217.219.219.75 -j DNAT --to-destination 217.219.219.71
;;
stop)
## add your 'stop' rules here
# Flushes custom chains
        iptables -F CUSTOMPREROUTING
;;
reload)
## add your 'reload' rules here
;;
*)
echo "Usage: $0 {start|reload|stop}"
esac
#end of file


- close and save

- then set the appropriate permission   :
# chmod +x rc.firewall.local

best