FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
313 views 1 comments
by anonymous
I'm only able to access the network behind the router via a static IP address.

Due to change of this static IP address, I needed to change the firewall rules. Aftre changing these firewal rules I can access the network behind the router. But after the change of the public IP address it also revers back the changes I made.

Again changed my firewall rules successfully and upgrade the router to the latest available firmware. But after the upgrade again the changes where revered back and not able again to access the network behind the router.

Now I do have two questions:

1. Why does this happens?

2. Is there a kind of CLI to change all static IP addresses to a new one?  Like change 12.12.1.2 to lets say 13.13.1.3?
by anonymous
I think I have a workaround for this issue. The are two firewall config at the following places:

/etc/firewall  and

/overlay/upper/etc/config/firewall

It looks like that /etc/firewall has the running config and the config to start with is the other one.  In the file '/overlay/upper/etc/config/firewall' The old static IP address was mentioned. So, I did  via on it and changed all static IP addresses to the right one. and did a backup of the config.

Before the change of config file, I saw the old IP addresses in the config file, but after the config file change a new backup was made and now the correct IP addresses where in it. So, I would assume with the restart of the router it will have the correct IP addresses in it.

1 Answer

0 votes
by anonymous

Hello,

It's difficult to determine the exact reason for the configuration loss without knowing the specific changes you made and the method you used. Maybe you updated the firmware with 'keep settings' disabled? This way, all configurations are lost when the firmware is updated.

Also, if you are looking to make persistent changes to the router's settings via the command line, such as IP addresses and firewall rules, you can utilize UCI (information is available here). It is worth mentioning that these configurations are also lost if you update the firmware with 'keep settings' option disabled.

For instance, to change the LAN IP address, you can follow these steps:

  • uci set network.lan.ipaddr='192.168.10.1'
  • uci commit
  • /etc/init.d/network restart

The uci set command is used to modify a specific option, and uci commit applies the changes. To make sure the device starts using the updated configuration, restart the corresponding service. In the case of changing the LAN IP address, the network service must be restarted.

  • /etc/init.d/network restart

To identify other services that can be restarted when making changes, use the following command:

  • ls /etc/init.d

To view available UCI configurations, you can use commands such as:

  • uci show
  • uci show network

Also, it would be great if you could explain what is it exactly that you are trying to achieve. What firewall rules you are configuring and why do you need to change them. Are you attempting to access a device in the LAN using the RUT's public IP address?

Kind Regards,

Andzej