What's new

simple walk through on adding to firewall-start

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

rostar99

Occasional Visitor
Can anybody help with adding the following line to the firewall-start script on the router?
iptables -l FORWARD -s 192.168.1.0/24 -j ACCEPT
I have always used dd-wrt web gui (web gui "save firewall" on linksys and netgear routers) for this and do not know the first thing about it manually. A google search only left me more confused.

Thanks in advance.
 
Take a look at Merlin's wiki.

Specifically you'll want to look at the user scripts and JFFS partition sections under usage.

PS. If you're a Windows user, be sure to use a text editor like notepad++ to make the file Linux-friendly.
 
Enable SSH on your router and install WinSCP on your PC. When you setup WinSCP to connect to your router use the SCP protocol. WinSCP will allow you to browse, edit, config, etc your router in an environment you are probably more familiar with. Its also good to install Notepad++ and make sure WinSCP uses that for its text editor, Preferences, Editor, make sure Notepad++ is added and the only thing listed, remove any others like normal Notepad. When you double click a text/config file in WinSCP it should open in Notepad++.


Then run WinSCP and connect to your router, navigate to /jffs/scripts and double click on firewall-start, it should open in Notepad++. Now all scripts need #!/bin/sh at the top, it might already be there add if not, then the commands so your file would look something like:

Code:
#!/bin/sh

iptables -l FORWARD -s 192.168.1.0/24 -j ACCEPT

Then save it and right click the file, goto Properties and make sure the Octal is set to 0777, click okay then reboot the router.

Now I have a question, what exactly are you trying to do with that iptables rule?
 
Last edited:
Via ssh;

echo "#!/bin/sh" > /jffs/firewall-start
echo "iptables -l FORWARD -s 192.168.1.0/24 -j ACCEPT" >> /jffs/firewall-start
 
kaiguy, r00t4rd3d and Adamm,
Thanks for the tips. I re-read the wiki and it makes more sense now than at first glance. I opted to go with winscp and I was able to accomplish the change in the files easily. Unfortunately the whole purpose was to connect two different router networks (one openvpn client and one straight wan) so that all devices could see each other. I could not get it work. I am trying instead to use a script to allow certain ips to bypass the openvpn gateway and go directly to the wan. I will start another thread and questions about that. Thanks again.
 

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