What's new

Merlin Buids mount jffs to USB

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

jet45

Occasional Visitor
Hi Merlin,

In your builds, is there a way to mount jffs to usb drive like DD-WRT? I plan to install your latest build for N-66U tonight.
 
Hi Merlin,

In your builds, is there a way to mount jffs to usb drive like DD-WRT? I plan to install your latest build for N-66U tonight.

Not through the webui, but you could manually mount it on a USB disk. The problem with that however is that USB disks can be mounted quite late in the boot process, which means almost none of the custom configs or the user scripts would work, which would make this kinda useless.
 
aw, ok, I'll give it a spin and see how it works out...Thanks for your firmware BTW, you've taken it really far, looks great.
 
Hi Merlin,

Got another question for you. I was reading your "Iptables tips" at your github site. I want to force users to only use my specified DNS servers. Should I use the firewall-start or the nat-start location for that?
 
Hi Merlin,

Got another question for you. I was reading your "Iptables tips" at your github site. I want to force users to only use my specified DNS servers. Should I use the firewall-start or the nat-start location for that?

firewall-start, since those rules are implemented in the filter table.
 
Hi Merlin,

So I tried to add the "force DNS" script to my router yesterday but I'm still able to use other DNS servers than the ones defined.


#!/bin/sh
iptables -I FORWARD 7 -p udp -o `nvram get wan0_ifname` -d 208.67.222.222 --dport 53 -j ACCEPT
iptables -I FORWARD 8 -p udp -o `nvram get wan0_ifname` -d 208.67.220.220 --dport 53 -j ACCEPT
iptables -I FORWARD 9 -p udp -o `nvram get wan0_ifname` --dport 53 -j DROP


I then gave the script executable by running this command chmod a+rx /jffs/scripts/*

I named the script "stop_dns_change.firewall-start". Is that the right naming convention? I also tried "firewall-start.sh" with a reboot in between.
 
Last edited:
From the README:

* User scripts *
These are shell scripts that you can create, and which will be run when
certain events occur. Those scripts must be saved in /jffs/scripts/
(so, JFFS must be enabled and formatted). Available scripts:

- services-start: Services are started (boot)
- services-stop: Services are stopped (reboot)
- wan-start: WAN interface just come up (includes if it went down and back up)
- firewall-start: Firewall is started (filter rules have been applied)
- nat-start: nat rules (i.e. port forwards and such) have been applied (nat table)
- init-start: Right after jffs is mounted, before any of the services get started
- pre-mount: Just before a partition is mounted. Be careful with
this script. This is run in a blocking call and will block the mounting of the
partition for which it is invoked till its execution is complete. This is done
so that it can be used for things like running e2fsck on the partition before
mounting. This script is also passed the device path being mounted as an
argument which can be used in the script using $1.
- post-mount: Just after a partition is mounted

Don't forget to set them as executable:

chmod a+rx /jffs/scripts/*

And like any Linux script, they need to start with a shebang:

#!/bin/sh
 
yup, thats the readme I followed. Did I miss something?

update: awww, i think i see it now..just name it "firewall-start"?
update2: yup, that was it, just named it "firewall-start", works now.
 
Last edited:

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