Set static IP

If you need to use a static IP for S2GW then you have to edit /etc/dhcpcd.conf file.

  1. To edit the file, start Midnight Commander sudo mc

  2. Go to /etc/dhcpcd.conf.

  1. Double click “4 Edit” or press F4 to open the file for edition.

  1. Go to the end of the file.

  2. Assuming you want to set Ethernet cable interface to: - IP 192.168.1.225 - mask 255.255.255.0 - gateway 192.168.1.1. - DNS 192.168.1.1 add interface eth0 static ip_address=192.168.1.225/24 static routers=192.168.1.1 static domain_name_servers=192.168.1.1 at the end of the file. For WLAN, add: interface wlan0 static ip_address=192.168.1.225/24 static routers=192.168.1.1 static domain_name_servers=192.168.1.1 at the end of the file.

  3. Double click “2 Save” or press F2 to save it.

  4. Enter “sudo reboot” to restart the system. This will end the terminal connection.

  1. To check the configuration, connect again to the new IP and enter “ifconfig”.

Last updated