What's new

Looking for Guidance for a total NOOB!

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

Mundane

New Around Here
I am used to working with Cisco equipment and not in Linux so please don't bash me to hard! I have a client that is using an ASUS RT-AC66U router and recently has become non PCI compliant do to a specific port forwarding rule they use. I have already contacted the writers of the software, but they refuse to change their program to a different port. What they did offer me was to limit the port to only except traffic from their WAN IP. After doing research I found that the Merlin Firmware is able to do this but I have to set it up. here is what I have done so far.
1. installed ASUSWRT-Merlin Firmware (latest release as of today)
2. enabled JFFS
3. Formated JFFS
4. Enable SSH
5. Logged in via Putty

Now I know nothing about nothing when it comes to Linux so I don't know how to write scripts for it or how to save or anything. I do know from the research I did that the script I need to run is 'iptables -t nat -I VSERVER 3 -p tcp -m tcp -s 98.129.x.x --dport 1433 -j DNAT --to 192.168.x.x'
What I don't know how to do is... (looking for step by step instructions) write the script file and run when ever the router is rebooted.

thanks for any help that is given.

Mund!
 
Last edited:
Search for lostrealm + merlin. Then check out the documentation for writing custom scripts. Not sure which script that would go in but that's where you should start looking.
 
Thanks for the help, but alas I have already done that... That is how I wrote the script... my question was now that I have the script how do I get it on to the router? How do I add a 'she bang' to it? you know Noob questions!
 
telnet 192.168.1.1
cd /jffs/scripts

Then you would have to

vi (script name)

I'm not sure what script that would go into. You'll have to determine that from the documentation on lostrealm.

A "she-bang" is this:

#!/bin/sh

Make sure thats the first line of your script file

Press 'i' key to start inserting text.
Press 'esc' key exit text insertion.
Press ';' then 'w' then 'q' to save and exit

At the command prompt enter this command

chmod a+rx (your new script file name here)

Exit and reboot and test to make sure its working.

So your script file should look like this:

#!/bin/sh
iptables -t nat -I VSERVER 3 -p tcp -m tcp -s 98.129.x.x --dport 1433 -j DNAT --to 192.168.x.x
 
Last edited:
Similar threads
Thread starter Title Forum Replies Date
RMerlin Looking for feedback: Anyone considering AiCloud important to them? Asuswrt-Merlin 211

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