RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
Create a script and place it under ./meta-rdk-broadband/recipes-ccsp/util/utopia
Add and install in utopia.bb file
SRC_URI += "file://iptables.sh" install -m 755 ${WORKDIR}/iptables.sh ${D}${sysconfdir} |
---|
In firewall.c file , create your function to invoke the script instead of service_start(); in main()
static int new_firewall() { system("sh /etc/iptables.sh"); return 0; } |
---|
Install your script under /etc
Invoke your script from firewall_log_handle.sh file
/fss/gw/usr/bin/GenFWLog -c |
---|
In script , the rules has to be cleared/flushed before adding . During firewall restarts , if the rules are not cleared before adding , the same rules will be listed multiple times in "iptables -L / -S" .
Place all your new rules in a script under /nvram
In firewall_log_handle.sh file , add a condition as below
if [ -f /nvram/<file>.sh ] then |
---|
Suppose , if any script already running with few set of ip rules (from source code ) which is invoked in firewall_log_handle.sh file , follow the below steps
copy the existing script from /<original-path> to /nvram
The changes (adding new rules manually) should be done in the script under /nvram
In firewall_log_handle.sh file , add the condition as
if [ -f /nvram/<file>.sh ] then |
---|
Once the complete verification is done , the script file from /nvram has to be deleted .