highwire
Regular Contributor
My scripting-fu is weak, so I'm asking for some help from the community.
I just replaced my Motorola SB6120 cable modem with a Cisco DPC3848. Both use 192.168.100.1 as the IP address to the GUI. With the Motorola, I could access the GUI by simply entering that IP address in the browser. With the Cisco I need to add these commands on my RT-AC87U with firmware version 378.53 to get it to work:
ip addr add 192.168.100.2/24 dev eth0 brd +
iptables -I POSTROUTING -t nat -o eth0 -d 192.168.100.0/24 -j MASQUERADE
I'm doing that via an ssh session, but of course I lose those settings on a reboot.
What I'm trying to figure out is how to add these to a startup script. My /jffs/scripts directory already has three files: post-mount, services-start and services-stop. I have the "Enable jffs scripts and configs" turned on already for entware.
Do I do this in firewall-start or wan-start, or somewhere else? What about timing - do I need a sleep delay to keep the commands from executing too early in the boot process?
Thanks for your help.
I just replaced my Motorola SB6120 cable modem with a Cisco DPC3848. Both use 192.168.100.1 as the IP address to the GUI. With the Motorola, I could access the GUI by simply entering that IP address in the browser. With the Cisco I need to add these commands on my RT-AC87U with firmware version 378.53 to get it to work:
ip addr add 192.168.100.2/24 dev eth0 brd +
iptables -I POSTROUTING -t nat -o eth0 -d 192.168.100.0/24 -j MASQUERADE
I'm doing that via an ssh session, but of course I lose those settings on a reboot.
What I'm trying to figure out is how to add these to a startup script. My /jffs/scripts directory already has three files: post-mount, services-start and services-stop. I have the "Enable jffs scripts and configs" turned on already for entware.
Do I do this in firewall-start or wan-start, or somewhere else? What about timing - do I need a sleep delay to keep the commands from executing too early in the boot process?
Thanks for your help.
Last edited: