What's new

GT-AC5300 - Need Bash Script to run at Boot

  • 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!

SkierInAvon

Occasional Visitor
I have a bash script that is designed to prevent connections inbound FROM the Internet from getting through (inbound) my Asus GT-5300.
I am trying to prevent my email server (SMTP Port 25) from (abusive inbound from the Internet) connections.
Script is designed to just "drop" inbound packets from a specific IP and/or subnet address.
I'd like to run this bash script (as root?) at boot time - or just after boot time after Asus GT-5300 is fully running.

Which directory should I put the script?
What command should I run (as root?) to get the script run?
I suppose crontab -e method might be an option as well...

(short example from script)

#!/bin/sh
iptables -I FORWARD -s 1.85.74.0/24 -j DROP
iptables -I FORWARD -s 100.1.226.6 -j DROP
iptables -I FORWARD -s 101.0.84.0/24 -j DROP

Thanks!
 
1) Why have you prefixed this as News? It's not a news article.
2) That's not a bash script, it's just a script. The router doesn't support bash.
3) To make persist changes to the router's firewall you'd have to use a third party firmware. Stock Asus firmware doesn't support custom firewall scripts.
4) Given 3) it's probably better/easier to drop the connections on the email server.
 
Last edited:
Thanks. I'll buy another Asus that does support Merlin. I know how to do what I want using the Merlin SW.
 

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!

Staff online

Top