2

I want to connect to a WiFi network without disclosing my original Hostname(Computer Name) to the network.

i.e, I want to connect to WiFi networks with a different (fake) Hostname of my choice without altering my Computer Name.

Thank you.

  • Not sure you can reliably do this... – Thomas Ward Dec 25 '15 at 23:51
  • I guess writing your own DHCP client is an option. – Hennes Dec 26 '15 at 06:54
  • +Hennes, Could you please elaborate 'writing own DHCP client' –  Dec 26 '15 at 13:01
  • 1
    Your hostname is your computer name, isn't it? – SuperSluether Dec 30 '15 at 16:53
  • @SuperSluether Yes, If I connect to a wifi network and if anybody goes to router page, In connected devices It shows my PC-name. –  Dec 30 '15 at 23:37
  • @VishwaPrakashHV So if your hostname is your computer name, you can't change just one. On a sidenote, why does it matter if people can see your PC name? The router page is always locked down on public Wi-Fi, and your home Wi-Fi should have a password on the network anyway. – SuperSluether Dec 31 '15 at 00:10

2 Answers2

3

hostname newname will temporarily change your host name till the next reboot. Its the closest thing to what you want, but definitely not what you need:

Things to note - your router may cache the old host name, so it might not help at all, depending on what you're really trying to do - but fabby's answer covers that in detail.

2

I could just tell you to go look in /etc/network/if-up.d/ and add a script there to generate a random host name every time you connect to any WiFi network, and then change it back to the original using /etc/network/if-updown.d/ but will this help you?

No!

Because that still divulges your IP address, and more importantly: MAC address which is an address uniquely identifying your machine, so you should spoof that too depending on your use case. (which isn't very elaborately documented in your question...)

Alternatively, buy this book which explains TCP/IP in detail and then you'll know as much as I know...

;-)

Fabby
  • 34,259