YazFI script throwing errors about ACCEPT

TechLifeWeb

New Around Here
I have YazFi working. Now I'm trying to allow access to certain IPs on my LAN. My script is:
Code:
#!/bin/sh
iptables -I YazFiFORWARD -i wl0.2 -o br0 -d 192.168.1.201,192.168.1.207,192.168.1.211 -j ACCEPT
iptables -I YazFiFORWARD -i wl1.2 -o br0 -d 192.168.1.201,192.168.1.207,192.168.1.211 -j ACCEPT

The problem is, when I try to execute this by applying YazFi settings during SSH I get this error:

Code:
Executing user script: /jffs/addons/YazFi.d/userscripts.d/myscript.sh

'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.3.8: host/network `192.168.1.201,192.168.1.207,192.168.1.211' not found
Try `iptables -h' or 'iptables --help' for more information.
Forcing YazFi Guest WiFi clients to reauthenticate

YazFi v4.4.2 completed successfully

My script has execute permissions. Has anyone seen this and have an idea why ACCEPT wouldn't work?
 

TechLifeWeb

New Around Here
You have created your script with DOS/Windows line endings. You need to create it using a Unix/Linux editor, or fix it using the following command:

Code:
dos2unix /jffs/addons/YazFi.d/userscripts.d/myscript.sh
That solved it. Notepad++ also has an EOL converter so I was able to use that easily.

I can now ping the allowed LAN addresses from the guest wi-fi but they don't resolve if I put the name in so that's what I'm looking into next.
 

Latest threads

Sign Up For SNBForums Daily Digest

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