Services listen on LAN only - can anyone improve upon this?
I like my services to listen on LAN IPs only. So I set this:
Network » DNS » Devices & Ports » Listen addresses: 192.168.1.1
The side effect of this is /etc/resolv.conf uses 127.0.0.1, so DNS on the router itself failed. I fixed it like this:
uci add_list dhcp.@dnsmasq[0].listen_address='127.0.0.1'
uci commit dhcp
/etc/init.d/dnsmasq restart
This worked, but any time you hit Save in the GUI in the DNS section, it gets reset. Any ideas how to either make that change permanent or change resolv.conf to query 192.168.1.1?
The way I convinced dropbear to listen only on the LAN was even more of a hack.
System » Administration » SSH Access » Interface: lan
On line 296 of /etc/init.d/dropbear:
case "$a" in *:*) continue;; esac
As expected, the file gets restored to its original in an update. If anyone knows of a more stable way to do this, I would appreciate it.