Install libnss-gw-name by entering the following commands in the terminal:
sudo apt update sudo apt install libnss-gw-name
nss module that names the current gateway’s IP address
This Name Service Switch (NSS) module resolves the name “gateway.localhost” to the IP of the current default gateways of the system. This allows easy access to router configuration and to check if connectivity problems are local or not.