What's new

[SOLVED] Blocking specific incoming IP addresses

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

No i wasn't trying it with sh:

Code:
admin@RT-AC68U:/jffs/scripts# dos2unix firewall-start
-sh: dos2unix: not found

With sh it gives this:

Code:
admin@RT-AC68U:/jffs/scripts# sh dos2unix firewall-start
sh: can't open 'dos2unix'
 
I have edited the firewall-start file with the built in vi editor (vi firewall-start), deleted the ^M (pressing x) and saved (pressing ZZ), which seems to work fine now. Annoying how Notepad++ saving in Unix format seemingly doesn't work.

I'm sure there will be a way for the firewall-start script to call for a file with blocked IP addresses - similar to this: https://www.rosehosting.com/blog/bl...sses-using-iptables-firewall-in-debianubuntu/, but I have no idea how to do that :rolleyes:

Thanks for your time and pointing me in the right direction. :)
 
Last edited:
Hmm....seems @RMerlin needs to double check that commit.

Beat me to it as I was typing....

Brute force method.....open in vi and delete the ^M's.... or

cd /jffs/scripts
cat firewall-start | tr -d "\r" > firewall-start.tmp
mv firewall-start.tmp firewall-start

or, there's a sed command I don't remember this late :)
 
dos2unix is there for me.
 
Ok...I'm stumped then for this user o_O

Next question would be:

Code:
nvram get buildno
nvram get extendno

I've seen quite a few users confusing 378.56 Beta 2 with 378.56_2.
 
Code:
RT-AC68U login: admin
Password:


ASUSWRT-Merlin RT-AC68U_3.0.0.4 Mon Nov  2 14:58:44 UTC 2015

admin@RT-AC68U:/# nvram get buildno
378.56
admin@RT-AC68U:/# nvram get extendno
2
admin@RT-AC68U:/#
 
Then I don't know why dos2unix is missing in your build. Could be a model-specific issue that was only fixed in the following builds - code trees might have been out of sync.
 

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