Skip to main content

How to change default gateway IP in OpenWrt?

Seeed OpenWrt image comes preconfigured with the necessary network settings. You might only need to change one network setting for the scenario which involves the Dual Gigabit Ethernet Carrier Board for Raspberry Pi CM4 connecting to your existing router, and the router has the default gateway IP set to which is the same as the default gateway IP for OpenWrt. In this scenario, you need to change the default IP of LAN interface on OpenWrt as follows:

  • Step 1. Open a web browser and log in to the OpenWrt portal by typing

  • Step 2. Navigate to System > TTYD Terminal and login with root as the username

  • Step 3. Open the following file

vi /etc/config/network
  • Step 4. Change the static IP address on the LAN interface as follows
config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'static'
option ipaddr ''
option netmask ''
option ip6assign '60'

Note: Here the static IP is changhed to However, you can type any IP address of your choice

  • Step 4. Reboot the router
Loading Comments...