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.

6
  • Not sure you can reliably do this...
    – Thomas Ward
    Dec 25, 2015 at 23:51
  • I guess writing your own DHCP client is an option.
    – Hennes
    Dec 26, 2015 at 6:54
  • +Hennes, Could you please elaborate 'writing own DHCP client'
    – user441517
    Dec 26, 2015 at 13:01
  • 1
    Your hostname is your computer name, isn't it? Dec 30, 2015 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.
    – user441517
    Dec 30, 2015 at 23:37

2 Answers 2

3
+50

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.

3
  • how about adding hostname newname in a script and running it everytime computer boots.
    – kashish
    Dec 31, 2015 at 3:27
  • That's as good as permanantly changing the hostname. Dec 31, 2015 at 3:29
  • but isn't it true that in this case the hostname and the computer name are different.
    – kashish
    Dec 31, 2015 at 3:37
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...

;-)

5
  • I don't like the air of this answer.
    – hytromo
    Dec 31, 2015 at 0:52
  • @hakermania: Thank you for leaving a comment with the downvote... shall we continue this discussion in chat?
    – Fabby
    Dec 31, 2015 at 0:57
  • 1
    I think it's better now. I felt it was belittling OP.
    – hytromo
    Dec 31, 2015 at 1:10
  • @hakermania :D VishwaPrakash and me were discussing this in chat (that's why I invited you) and I have a very dry sense of humour! I'm pretty sure he wasn't offended... >:-) Double thanks for removing the downvote. (I always leave comments with downvotes as well)
    – Fabby
    Dec 31, 2015 at 1:12
  • 1
    Oh, I didn't catch the sarcasm. Everything's alright!
    – hytromo
    Dec 31, 2015 at 1:13

You must log in to answer this question.