What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

firewall-start script doesn't start

v1rt

Occasional Visitor
Hi folks,

I created a firewall-start file under /jffs/scripts

admin@RT-AC68U-6000:/jffs/scripts# pwd
/jffs/scripts
admin@RT-AC68U-6000:/jffs/scripts# ls -lrt
-rwxrwxrwx 1 admin root 3610 Apr 4 00:52 firewall-start
admin@RT-AC68U-6000:/jffs/scripts#

I rebooted the router but after it's rebooted, the rules didn't take into effect. I found out when I executed iptables -L

Did I miss anything?

If I manually run ./firewall-start, I'll see the rules when I execute iptables -L

Thanks!
 
I created another test script called tmp-start and chmod +x the file. The code is

admin@RT-AC68U-6000:/jffs/scripts# ls -lrt
-rwxrwxrwx 1 admin root 3610 Apr 4 00:52 firewall-start
-rwxrwxrwx 1 admin root 50 Apr 5 04:02 tmp-start

#!/bin/sh

/bin/echo "test string" > /tmp/test.txt

I rebooted the router. I ssh to it and checked /tmp. The test.txt file is not there. Did I miss anything that I need to enable in the gui?
 
Enable JFFS custom scripts and configs

Create your script in:
/jffs/scripts/services-start

services-start is the file

then:
chmod a+rx /jffs/scripts/services-start

Start your script
/jffs/scripts/services-start
 
so firewall-start won't work? I mean, my firewall-start works when I run it manually but when I reboot the router, it doesn't take in effect

Also, you wrote "Enable JFFS custom scripts and configs". Is this a step?
 
The System Log also now reports if you are trying to use a script without enabling this option. Users should get into the habit of checking their system log as the first troubleshooting step when dealing with any problem.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top