Be patient, we have to do something before he step to advance session. In this article we will set some environment for the router and give a little configuration for it.
What would we do?
- Set up hostname
- Set up password
- Set IP address
So let’s start
Set Up Hostname
Hostname is a string identify a node in a network. To set a hostname we have to edit file /etc/config/system. Search string and modify it like this:
config system option hostname 'XGF135-SkyGear'
Replace XGF135-SkyGear with you desired hostname. In my case, my router would be renamed to XGF135-SkyGear.
Set Up Password
An OpenWRT box come with default blank password for root account. This is dangerous for production machine as anyone can login without password. To set up a password, we can use this command:
Just fill password for root account, twice.
Set IP Address
We can use IP address other than 192.168.1.1. To do so, modify /etc/config/network by using following command:
sed -i -e 's/192.168.1.1/<your IP here>/' /etc/config/network
Again, replace <your IP here> with your desired IP address.embedded, openwrt