How to make a WiFi hotspot connection always in the Work or Home firewall profile?

5

1

I am using my Android phone as WiFi hotspot. Each day when I start my WiFi hotspot in my mobile, it creates a new connection and then it connects with my laptop's WiFi connection.

Each day I need to change Network location by right clicking on my laptop's WiFi icon and selecting "Open Network and Sharing Centre". I click "Public Network" link below the Network name (Nexus 52 as shown in the image).

enter image description here

To access my laptop's WAMP connection I need to change this "Public Network" to "Home Network" or "Work Network". I do this by clicking on "Public Network" link whichshows me the following dialog:

enter image description here

After doing these steps I can access my WAMP's web services from connected tablet or other phones.

Each day after connecting to my phone's WiFi, it gives its name as Nexus 1, Nexus 2 and so on (today it is Nexus 52). Every day a new connection is created and I need to follow all above steps to every day.

But when I come to my office and I connect office's WiFi I do not need to follow above steps of "Home Network" or "Work Network" everyday. I did it once and after that each time when my laptop connects to my office WiFi, it is automatically set as a "Work Network".

How can I do same with my phone's hotspot? I need to fix its name and type as "Home Network".

I am running Windows 7 Home Premium.

enter image description here

Lucifer

Posted 2018-12-12T09:13:55.240

Reputation: 1 377

Do I understand correctly that the problem arrives at home only, where Internet is supplied by the phone company, but does not arrive at the office where the Internet is supplied by company routers? In this case, it is your phone company that has set your residence as Public, and you should call their Support. – harrymc – 2018-12-14T09:59:23.780

@harrymc, Yes you understood it correctly – Lucifer – 2018-12-14T10:18:47.200

More possibilities: (1) Try the registry edit in the last entry of this thread. (2) Check if the phone presents the same MAC address on every tethering, and if not maybe use some app for it. For example the trialware ClockworkMod Tether (no root) that installs a virtual network adapter on the computer.

– harrymc – 2018-12-14T11:40:59.593

Network Location Awareness (NLA) is buggy trash code on Win7. I sometimes disable that service because there is no fixing it. – HackSlash – 2018-12-14T17:07:34.560

So if you look at known networks, there are some 52 or more "Nexus x" networks? (Where x is the number for that day.) If that is the case maybe try forgetting all of those networks and start over. Without a Nexus 1, Nexus 2 etc. it may start to work properly. Correction, it is off to the left of network and sharing center, called "Manage Known Networks" in win7 – Eric W. – 2018-12-16T13:38:39.500

Did you try my above comment? – harrymc – 2018-12-17T07:01:12.530

@harrymc, not yet, but I will do it by EOD – Lucifer – 2018-12-17T08:16:38.233

@harrymc, I tried your first possibility. It is not working. second possibility is for USB tethering while I am looking for WiFi tethering solution. – Lucifer – 2018-12-17T08:48:40.250

1@EricW. , actually there 1312 Connections.....+ 52 (again starting from 0) – Lucifer – 2018-12-17T08:53:19.250

I believe the fault is with your ISP, which you will have to work around with an app (if you can't get them to help). Try another one : FoxFi (WiFi Tether w/o Root), but there are more in the Store.

– harrymc – 2018-12-17T12:39:48.967

@harrymc Thanks for the app, this app does nothing but same as mobile phone's own Wifi Hotspot. Now I think you are right, fault is with my ISP only. – Lucifer – 2018-12-17T14:32:17.773

Answers

2

The Windows Network Location Awareness (NLA) service uses quite a few characteristics of the network an interface is connected to in order to determine if it's been connected to that network before. The fact Windows is not remembering your choice of firewall profile indicates that there are key differences between each "iteration" of your phone's Wi-Fi hotspot. (Your work's Wi-Fi on the other hand isn't changing between connections in regard to these characteristics which is why you only needed to put it into the "Work" firewall profile the first time.)

There are options through Group Policy to control how NLA categorizes unidentified networks, however you're running the Home edition of Windows which doesn't have Group Policy (and to my knowledge the necessary settings can't be configured directly through the Registry).

Therefore I can offer you two alternative solutions:

Option 1: Don't fight it. Create the firewall rules you need in the Public firewall profile. Because your phone's hotspot will be assigned the public firewall profile by default, the connection to your WAMP services will work without any additional config changes each time you connect to it.

Option 2: Identify which characteristic(s) of your phone's Wi-Fi is making each connection "unique" and prevent it from changing...if you can. Based on the fact your phone uses a new SSID each time you connect I'm doubtful this option will work since I assume you can't control that. But if you want to try, here are the characteristics NLA uses to identify a network according to this Microsoft TechNet blog post:

  • Presence of a Domain Controller
  • Bandwidth
  • Internet Connectivity
  • Primary DNS Suffix
  • DC Authenticated (i.e. machine is authenticated to a DC via the network interface)
  • Host IP address
  • Subnet Mask
  • Subnet IP address
  • Default Gateway IP address
  • WINS server
  • SSID
  • Default Gateway MAC address
  • 802.1x Authentication status

Documentation is a bit scant on exactly how and in what combination NLA uses these characteristics to decide a network is unique (e.g. the fact your host gets a different IP address isn't sufficient to make NLA consider the network "new"), so you may have to do some experimenting.

I say Reinstate Monica

Posted 2018-12-12T09:13:55.240

Reputation: 21 477

0

Networks are recognized based on either SSID or (when the SSID is already registered) MAC-adress of your router. Every new network is per default listed as "public" to avoid data leaks. So either your phone is reporting a new MAC every time or counts the number of hotspots in its SSID.

Werdck

Posted 2018-12-12T09:13:55.240

Reputation: 43

0

The problem arrives at home only, where Internet is supplied by the phone company, but does not arrive at the office where the Internet is supplied by company routers. In addition, trying Android apps that provide WiFi hotspots has not made a difference.

In this case, it is your phone company that has set your residence as Public. In the office, the network is naturally defined as "Work".

I have found many references to this problem on Internet, but there is no explanation why this difference causes Android to behave in a different manner. It seems that some different information from the ISP on each tethering causes Android to create a new virtual network adapter with a different MAC address and a new SSID.

You should call the ISP's Support, but there might be some difficulty in reaching a person technical enough to understand the problem. My own phone company markets a small portable WiFi connector, which is in effect a permanent WiFi hotspot that replaces your phone. If your ISP does too, such a gadget might work better in your case, although it might come with a fee (but they might be open to negotiation if you complain loudly enough).

harrymc

Posted 2018-12-12T09:13:55.240

Reputation: 306 093