sed 's~FILE=.*$~FILE=/jffs/fake-hwclock.data~' /opt/bin/fake-hwclock > /jffs/fake-hwclock
chmod +x /jffs/fake-hwclock
/jffs/fake-hwclock
echo "/jffs/fake-hwclock load" >> /jffs/scripts/init-start
chmod +x /jffs/scripts/init-start
echo "/jffs/fake-hwclock save" >> /jffs/scripts/services-stop
chmod +x /jffs/scripts/services-stop
echo "sleep 2;/jffs/fake-hwclock save" >> /jffs/scripts/wan-start
chmod +x /jffs/scripts/wan-start
echo "cru a hwclock \"0 * * * * /jffs/fake-hwclock save\" >> /jffs/scripts/wan-start
opkg remove fake-hwclock
:/tmp/home/root# cat /jffs/scripts/init-start
#!/bin/sh
touch /tmp/000initstartted
/jffs/fake-hwclock load
:/tmp/home/root# cat /jffs/scripts/wan-start
#!/bin/sh
touch /tmp/001wanscriptstarted
sleep 2; /jffs/fake-hwclock save
cru a hwclock "0 * * * * /jffs/fake-hwclock save"
# cru l
jffs gets mounted very early. I run this setup. Add a "touch /jffs/touched" to /jffs/init-start.No luck with that either. It seems that the /opt directory, under which the writeable /jffs directory is mounted, doesn't get mounted until well after booting is completed; none of the partitions on the USB drive do. Therefore, the scripts might not get executed correctly in time; though, I'm just speculating according to my observations of post-boot syslogs/dmesg.
Let's add a test to the script so that we can check if it ran correctly or not. I saw something to that effect on the Wiki somewhere a long time ago, where the script creates a file; therefore, if the file doesn't exist, the script didn't run.
NOTE: you're example failed to include a "shebang" in the init-start and wan-start scripts.
Sadly, though, dnscrypt-proxy still doesn't work.
if I use
iptables -A OUTPUT -p tcp --dport 53 -j DROP
in
/jffs/scripts/firewall-start
my router can't connect to members.dyndns.org to update dyndns, nor can I ping any site nor does opkg update works.
All my connected devices do run without any problems, so I am guessing dnscrpyt is working fine.
But I would love to disable outgoing dpt 53 and still getting my router to connect to the outside.
How to solve?
iptables -t nat -A PREROUTING -i br0 -p udp --dport 53 -j DNAT --to $(nvram get lan_ipaddr)
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 53 -j DNAT --to $(nvram get lan_ipaddr)
There are no entries pertaining to dnscrypt at all. Maybe I need to reinstall entware?i'll correct them before I put on wiki. What error is in your /tmp/syslog.log?
grep dnscrypt /tmp/syslog.log
If there are no entries at all, It sounds like entware is not starting properly (which would also make sense as to why hwclock wasn't starting).
But why does blocking dpt 53 not work? i thought dnscrypt is proxing dns requests from spt 53 to dpt 443 of the dnscrypt provider?
how may i check (without the need to sniff the network) if dns requests from clients are really encrypted now?
There are no entries pertaining to dnscrypt at all. Maybe I need to reinstall entware?
:/# cat /opt/etc/init.d/S09dnscrypt-proxy
#!/bin/sh
ENABLED=yes
PROCS=dnscrypt-proxy
ARGS="--local-address=127.0.0.1:65053 --daemonize -R opendns"
PREARGS=""
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
. /opt/etc/init.d/rc.func
Looks right but entware isn't starting stuff. That's your problem... You'd see entries in syslog if it was.Code::/# cat /opt/etc/init.d/S09dnscrypt-proxy #!/bin/sh ENABLED=yes PROCS=dnscrypt-proxy ARGS="--local-address=127.0.0.1:65053 --daemonize -R opendns" PREARGS="" DESC=$PROCS PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin . /opt/etc/init.d/rc.func
opkg update
opkg upgrade
Did I messed up with wiki? Tested twice on clean installation with no issues.i'll correct them before I put on wiki. What error is in your /tmp/syslog.log?
grep dnscrypt /tmp/syslog.log
If there are no entries at all, It sounds like entware is not starting properly (which would also make sense as to why hwclock wasn't starting).
Thread starter | Title | Forum | Replies | Date |
---|---|---|---|---|
B | (solved) Dnscrypt blocked-names.txt automatically deleted upon modification | Asuswrt-Merlin | 4 |
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!