1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

firewall-start does not get executed after Reboot

Discussion in 'Asuswrt-Merlin' started by snbsesei, Jun 21, 2018.

  1. snbsesei

    snbsesei New Around Here

    Joined:
    Jun 21, 2018
    Messages:
    4
    Hi all :)

    I have to put a new iptable rule. For that I have created a script and named it "firewall-start" and located it under /jffs/scripts/
    If I run the script manually evertyhing is working as expected. But the script will not get executed after a reboot. The Log doesn't show anything about the execution :(

    cat /jffs/scripts/firewall-start
    #!/bin/sh
    logger -t "$0" "Starting IPTABLES Configuration"
    iptables -I FORWARD 1 -s 192.168.178.0/24 -j ACCEPT
    logger -t "$0" "Hey, I'm working!"



    Could you assist me with this?
    Thanks in advance!


    FW: 380.70
    Model RT-AC66U


    Here is the Log Output:
    https://pastebin.com/CrKDNCgp
     
    Last edited: Jun 21, 2018
  2. Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!
  3. Zastoff

    Zastoff Regular Contributor

    Joined:
    Nov 21, 2017
    Messages:
    50
    Location:
    Sweden
    Have you tried?
    chmod +x firewall-start
     
  4. snbsesei

    snbsesei New Around Here

    Joined:
    Jun 21, 2018
    Messages:
    4
    thanks for your quick reply.

    Yes:
    ll /jffs/scripts/
    -rwxrwxrwx 1 admin root 161 Jun 21 21:32 firewall-start*
     
  5. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    5,715
    Location:
    UK
    Try changing the logger statements, it can be a bit temperamental with the -t parameter. For example:

    logger -t $(basename $0) "Starting IPTABLES Configuration"
     
  6. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    5,715
    Location:
    UK
    Ah, just seen this in your log file:

    Aug 1 02:00:30 custom_script: Found firewall-start, but custom script execution is disabled!
     
    snbsesei likes this.
  7. snbsesei

    snbsesei New Around Here

    Joined:
    Jun 21, 2018
    Messages:
    4

    Damn, thank you so much. Don't know, I have overseen this log entry every time. Now it seem to work fine!

    Thanks guys, have a nice day!
    There should be a hint to activate the custom-scripts in github!
     
  8. kfp

    kfp Very Senior Member

    Joined:
    Jun 26, 2014
    Messages:
    641
    Except there is. I’m seeing a pattern here ;)

    https://github.com/RMerl/asuswrt-merlin/wiki/User-scripts
     
  9. snbsesei

    snbsesei New Around Here

    Joined:
    Jun 21, 2018
    Messages:
    4
Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!