Welcome, Guest. Please login or register.
Did you miss your activation email?
Friday 13 December 2024, 04:39:49 pm

Login with username, password and session length

CLICK HERE for the The official Endian Roadmap and Issue tracker
14261 Posts in 4377 Topics by 6517 Members
Latest Member: Sandro
Search:     Advanced search
+  EFW Support
|-+  Support
| |-+  General Support
| | |-+  place for custom firewall rules
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: place for custom firewall rules  (Read 14575 times)
gkos
Jr. Member
*
Offline Offline

Posts: 8


« 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?

Logged
cocoalcazar
Full Member
***
Offline Offline

Posts: 42



« Reply #1 on: Friday 24 January 2014, 01:53:26 am »

Try :

/var/efw/firewall

Logged
kieronrob
Full Member
***
Offline Offline

Gender: Male
Posts: 57


« Reply #2 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
Logged
kikilinux
Full Member
***
Offline Offline

Posts: 47


« Reply #3 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
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Page created in 0.078 seconds with 18 queries.
Powered by SMF 1.1 RC2 | SMF © 2001-2005, Lewis Media Design by 7dana.com