What's new

Solved Need help with nat-start scripts

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

cathupo

New Around Here
Loaded the nat-start scripts under /jffs/scripts, but still not able to execute. Already granted 777 permission. Tried manually execute by /jffs/scripts/nat-start in PuTTY, but error message of "nat-start not found". Seems the file of nat-start is not able to be executed, but not sure why.

Here are some commands I run.

admin@RT-AC68U-F000:/jffs/scripts# ls -l
-rwxrwxrwx 1 admin root 123 Apr 23 22:49 nat-start


admin@RT-AC68U-F000:/tmp/home/root# /jffs/scripts/nat-start
-sh: /jffs/scripts/nat-start: not found

From the system log, it seems the nat-start was called. But the setting wasn't triggered, so it didn't execute.
custom_script: Running /jffs/scripts/nat-start

Also attached the scripts in nat-start:
admin@RT-AC68U-F000:/tmp/home/root# cat /jffs/scripts/nat-start
#!/bin/sh
iptables -t mangle -A POSTROUTING -j TTL --ttl-set 65
 
You have created the script using a Windows editor. You need to change it's format from Windows to Unix with the following command.
Code:
dos2unix /jffs/scripts/nat-start
yep... cr - lf - and cr+lf differences will bite every time...
historical computing idiosyncrasies...
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top