What's new

nat-start not working at startup

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

alini76

Occasional Visitor
nat-start seems to do not work during startup of the router:

1 - /jffs/scripts/nat-start:
#!/bin/sh
ifconfig br0:1 86.120.x.x netmask 255.255.255.0

the file seems to have 777 permissions


2 - after reboot, /jffs/syslog.log contains a line like
Dec 14 08:23:59 custom_script: Running /jffs/script/nat-start

3 - when run manually
/jffs/scripts/nat-start
causes the ip to be set correctly
 
Welcome to the forums @alini76.

What firmware version? Which router model?

Was this ever working correctly for you? Or, is this a new router/model in your network?
 
nat-start is triggered by changes to the WAN interface. br0 is the LAN interface.

Why are you assigning a public IP address (86.120.x.x) to the LAN interface?
 
Why are you using the nat-start script at all? That's for NAT rules. Seems to me if you want to multihome the LAN network interface, that's best done using the services-start event handler. init-start might work too, but I don't know if that might be a bit too early in the bootup process.
 
1 - For many years I am using RT-AC68U. I have a router which is running 386.3_2, but I found some NVRAM warnings, cannot edit VPN users issues which made me thought to install a new router from scratch.
2 - I installed 386.2_6 on another RT-AC68U, and started by formatting JFFS, and enabled the custom scripts. Then copied the nat-start script from the other router.
86.120.x.x/24 is my own routable subnet. I have another provider assigned public IP, which is assigned to the WAN.
 

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