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!

how to hold iptable rules?

Discussion in 'Asuswrt-Merlin' started by saccleo, Jun 13, 2019.

  1. saccleo

    saccleo Occasional Visitor

    Joined:
    Oct 27, 2018
    Messages:
    15
    i have setup some rules and works fine. but sometime when i login by ssh, i found that the rules i setup disappeared.
    how can i hold the rules? and why this happened?
    thanks a lot!
     
    Last edited: Jun 13, 2019
  2. martinr

    martinr Part of the Furniture

    Joined:
    Nov 27, 2014
    Messages:
    2,018
    Location:
    United Kingdom
    Where have you put the rules (which directory)? Or, how are you currently doing it?
     
    Last edited: Jun 13, 2019
  3. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    8,647
    Location:
    UK
  4. saccleo

    saccleo Occasional Visitor

    Joined:
    Oct 27, 2018
    Messages:
    15
    i write some script and store in /opt/bin
    and lanch them in /jffs/scripts/wan-start

    and usr cron task to check the rules status every 20 minutes.

    i don't know what cause the rule disapeared.
     
  5. saccleo

    saccleo Occasional Visitor

    Joined:
    Oct 27, 2018
    Messages:
    15
    just put the iptable set script in firewall-start or nat-start?

    does it mean, when some event cause the iptable rules changed, the firewall-star or nat-star will be run ?
     
  6. saccleo

    saccleo Occasional Visitor

    Joined:
    Oct 27, 2018
    Messages:
    15
    serveice restart_webdav will cause the iptable rules changed?
     
  7. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    8,647
    Location:
    UK
    Yes.
     
  8. saccleo

    saccleo Occasional Visitor

    Joined:
    Oct 27, 2018
    Messages:
    15
    ok, thanks a lot. and i will try it .