How Can I Change the Hostname Without Room to Install Luci?

I installed the Tor firmware for the mini-router. It’s great but now I can’t install Luci which means I can’t change my hostnname. The hostname identifies the model of the router, that it’s a gl.inet mini-router.

There aren’t that many people in the world who own these (it’s not millions) and it makes it a lot easier for me to be tracked and could result in having less privacy.

Is there a way I can get into the router and change the hostname?

Also, is there a file I can edit anywhere to make sure that the 1st node and 2nd node are not in certain countries?

You can SSH into the router and edit the WAN hostname and/or LAN hostname in the /etc/config/network file, then reboot.

I do not work for and I do not have formal association with GL.iNet

1 Like

How do I ssh into the router? I’ve wanted to do this a long time. I can use terminal but when I type ssh 192.168.8.1 it says I don’t have a key

I need a key!

I can figure out how to generate a key possibly but I don’t know how to get it onto the router.

I have used PuTTY free software (https://www.putty.org) for a number of years. On the first connection, it will ask you whether to trust and allow the connection.

I do not work for and I do not have formal association with GL.iNet

1 Like

Will it ask me for a password?

Yes. Log in with username root and use your admin password from the GL.iNet UI:

I do not work for and I do not have formal association with GL.iNet

1 Like

Right now I am trying in a linux terminal to connect

ssh 192.168.8.1

it then asks for a password. I’ve tried my gl password multiple times and it doesnt accept it

i dont know who you are, but thank you for this

once i get to the shh command line, do i need to log in again somehow?

i typed in a basic command “dir” to show the directory structure and it fails, but I am connected

does busybox have really unusual commands? or do I need to go into a different window to connect? ash seems to reject everything i type as a command it doesn’t understand

okay i am seeing busybox does have some limited linux commands, it’s just not many

I have no idea how to edit this file

In a normal linux system I would just sudo nano and then open what I need. How do I do that here?

OpenWRT is Linux-based, so you have to use Unix commands:

cd /etc/config
ls -l network

Personally, I use the vi editor as I know it from many years ago. There is also the vim editor, which is the successor to vi.

If you do not know these editors, then you can install WinSCP free software for Windows, instead of ssh:

You can also install the nano package in OpenWRT if you want to use that.

I do not work for and I do not have formal association with GL.iNet

1 Like

yes i will install nano

i use linux already, just not busybox linux

i was actually trying to get in with nautilus to modify things since i don’t have windows and tried to do ssh://root@192.168.8.1 and it fails and won’t let me in

i can add in nano and do it locally but it would be so much easier to be able to see what im doing in nautilus

I went in, installed nano, and edited both the wlan and wlan hostname and it didn’t result in any change

I reset the router multiple times and verified the settings were saved in /etc/config/network

i had this router connect to another router (router 2) to verify if the hostname had changed and was able to see the hostname has not changed all all. this was not an issue regarding cache or the other router not updating things since i cleared settings before the connect on the other router.

this did nothing, the problem is not fixed :frowning:

There are 2 aspects of displaying the hostname of the router:

  1. The WAN hostname of Router 1 is displayed in the LuCI UI and maybe elsewhere. I have set to my router’s hostname to glinet2 in this example, which is correctly displayed:

  1. The WAN hostname of Router 1 is sent to and displayed by an upstream Router 2, which my understanding is that Router 1 has to get an IP address from the DHCP server of Router 2.

Can you confirm that the WAN interface of Router 1 is configured to be a DHCP client of Router 2? If it is, can you post the modified /etc/config/network file?

Also, what makes/models are your Router 1 and Router 2?

I do not work for and I do not have formal association with GL.iNet

1 Like

This is a travel router. It has very little space and I can’t install LuCI. I know how to change the hostname in LuCI. I would like to be able to do that but it’s not installed.

All my space is taken because I have installed firmware that has tor built into it. The tor software takes up a large amount of space on the travel router. I’m surprised I could even install nano.

I replaced the hostnames “GL-model” with “samplename” in /etc/config/network and checked multiple times including after rebooting to make sure it had saved. network is about a 30 line file or less with different settings. I was in the right place. There were two spots for hostnames and I changed both.

I connected to the other router and the hostname was still GL-Model and not samplename. The other router lets me see the names of what is connected to it.

There must be some other place that the hostname is stored. When the wifi network connects to the other router, it’s pulling this hostnname from another file that wasn’t edited. I just dont know what file it is.

Is there a program i can install that changes the hostname without taking up as much space as LuCI? I could install the program using the normal interface and run it in the terminal. Is there anything like that? i got nano on there

dont think this will work at all after looking.

Which “Hostname” do you want to change?

The hostname can be changed in /etc/config/system.

But it may not what you mean.

Do you refer to the name that it appears in your windows (if you use windows) network?

2 Likes

I missed finding that the hostname is also in /etc/config/system.

I do not work for and I do not have formal association with GL.iNet

1 Like