Windows 10, Set-NetConnectionProfile with Index changes all Networks - windows

In Windows 10 64bit I use the command Set-NetConnection Profile -InterfaceIndex 30 -NetworkCategory Private in the Powershell and it changes all network connections which had the same profile as the interface with index 30.
My Question: Why does this command change all networks?
They are all virtual networks, but I tried the same on another PC with two physical adapters and the same thing happens.
networks before change
the command I am entering
networks after change : i.stack.imgur.com/WW4Iy.png
I found technet.microsoft.com/en-us/library/jj899565.aspx (sorry reputation) and it says The Set-NetConnectionProfile cmdlet changes the network category setting of a connection profile. A connection profile represents a network connection.
Could it be that a connection profile is representating more than one network connection?
Edit:
They are all not identified Networks.

When you change something for unindentified networks, because these networks are unindentified, they are not given a connection profile, this means any change is applied to all unidentified networks.
What you need to do is to make them identified. Identification relies on having a gateway address. One trick is to add a second IP to the interface, usually just 1 before the broadcast address for the subnet, and then assign that address as the gateway. This makes Windows automatically identify the network (using your own machine's characteristics), and then allow you to set a firewall profiles to it, and other details.
I have created a powershell script that makes this easy: https://gist.github.com/CMCDragonkai/dbd2d94840cdaf79d3f6964bbd58e92f
Try it!

Related

How to notify my IP to other devices in my network

I have a setup with a few Linux devices and one windows device connected to a switch. I would like a way to tell the windows machine which IPs the Linux machines get when booting. I have tried to populate the arp table on the windows machine by pinging broadcast but I have not succeeded because windows doesn't reply to broadcast.
I have tried also nmap but that is not an option because it takes really long to scan (the net mask is 255.255.0.0)
You could set up a static IP and other network settings on all the Linux machines.
then on your Windows system edit your HOST file with the names and ip addresses.
This should bypass the need for a DHCP or DNS.
However other systems on the network will not be able to find your systems.
Regardless you still need to speak to the guys who administer the network to add your linux systems in.
It is rather impolite and/or against policy and somewhat bordering on illegal; to simply plug in your systems into the network not owned by yourself.
So if you have a right or need, the administrators will listen and should help you.

Can not join to active directory

I installed ws2016 server as a domain controller on virtualbox using internal network .
Everything was successfully installed about active directory and i created domain name as 'stark.local'
Also i created another ws2016 on virtualbox using internal network and I want to join new virtual machine to my domain controller.
Can ping dns server(which is my domain controller) and also Firewall off, no anti-virus installed.
However when i try to join dc it gives below error;
what i realized that i can not make nslookup to my dns server ip.
Even if on domain controller can not nslookup its self.
ipconfig of Domain Controller
ipconfig of node1;
I had no hair now and need your help.
Finally solved!
The problem was using internal network. I changed to host-only network and it worked.
AC DC
Using public IP addresses will always get you in trouble, try changing them to something like:
192.168.1.10 & 192.168.1.20
(Please read entire answer before modifying)
Also, i would recommend checking this link on the official microsoft forum. I know it's from windows 7, but i think the main problem you have is with the DNS configuration and it's very well explained there.
I'll summarise the link above here:
#Meinolf Weber's answer
If domain machines contain public DNS servers as 200.88.127.23 and 196.3.81.5 you will always have trouble.
Remove them on ALL domain machines and run ipconfig /flushdns and ipconfig /registerdns and reboot clients and domain member servers and restart the netlogon service on DCs instead reboot.
For internet access please configure the FORWARDERS in the DNS server properties in the DNS management console with the public DNS servers.
Explanation:
You can't join a machine to the domain using public IP because it is trying to locate your domain to the public IP which has not information of the private build domain.
Use only local IP in the clients NIC.
Hope it helps, if not please give more detailed information of the issue as well as the DNS configuration (screenshot or whatever you can).
EDIT 1: also check "time settings" on both machines, i know it might seem silly, but that sometimes gives DNS and DC issues. Check IPv6, could be another probable cause of the issues you're having (Go to the network and sharing center, modify the properties of the NIC and unselect TCP/IPv6).
I'd check first IPv6, that'll save you work if it's only that.
EDIT 2: again, i would recommend changing the IPs (if possible) to another network, as long as the 169.254.x.x is used (assigned) when there's no DHCP server, but as you say they can ping to each other, it may not be necessary the problem.
I can see there's no router in the network but, a Windows Server should be providing DHCP, otherwise things like DNS suffix don't work.
So check that:
- You have the DNS role installed and configured to support AD.
SOLVED on answer below
The explanation i would give for this is that "secure communication" is an often requirement, thing that internal network doesn't provide.

Create local network with internet access routed through a single computer

I want to create a local network in my workplace which has around 20 computers. All of these are connected through a single computer(server), which is attached to a router with internet access. I want all the internet traffic from my 20 computers to route through this server such that the above 20 computers are not visible from the outside network.
So the current scenario is like this:
The server has a IP : 172.16.16.198
The computers connected to this server through the router also have the IP in the same network i.e. 172.16.16.xx
As such all the computers in my workplace are visible from any other computer in the organisation connected to the same network.
You can assume that the server is connected to some internet network within the organisation, hence the private IP address(172.16.16.198)
All systems are Windows based.
I have tried the following so far on one of the 20 computers:
Changed the DNS to the server's IP.
Changed the default gateway to server's IP.
Changed to static IP of 172.16.17.12(random but having the same subnet as the gateway)
The above approach didn't work. What can I do to meet my requirement?
PS: I am a newbie to networking so this might be a very fundamental mistake.
The first server NIC should be connected to the router and have an IP from the same network as the router:
172.16.16.198/24
The second server NIC should be connected to other computers with a switch and have an IP from the another private network, for example:
10.0.0.1/24
Choose proper gateway(in my case the first address worked i.e. xx.xx.xx.1) and the DNS can be set to the default DNS of first NIC.
Check if after those steps the internet works on server.
Share the server internet connection with other computers. Right click on the first NIC, Properties menu item, Share tab and check "Allow other users to use this connection". Select the name of network card with which internet has to be shared in drop down(eg NIC2). Click on Settings below to select all the services(eg. https,ftp,etc.) you want to share with the other network card.

How to find advanced info about a network I am connected to?

I currently have a laptop connected to a WPA2 Enterprise wireless network, and I'm trying to connect a new device. There's no wireless set-up guide for the type of device I'm trying to connect, so I would like to manually enter in all the necessary settings. I need to know:
EAP Method (PEAP vs. TTLS)
Phase 2 Authentication if applicable (PAP vs. MSCHAPv2)
CA Certificate if applicable
Connection type (DHCP vs. Static)
If connection type is Static, I would need to know:
IP Address
Subnet Mask
Router
DNS
My assumption is that because I already have access to a laptop connected to / set up for the same network, there must be some way to retrieve that information about the network from my laptop while connected. Is there a way to do this? I'm using windows 8.
You can access to the wireless network configuration of the connected machine. For that you can navegate throught the gui or you can type in run (windows key+R) "ncpa.cpl". This command open directly the appropiate window. Double click the wireless connection and click on details, and you can see if this machine is connected using dhcp or static ip, ip address, mask, ... and in wireless properties button, security tab you can see the other details (EAP method, etc)
http://www.howto-connect.com/how-to-find-wifi-password-in-windows-8/

Resolve host name to an ip address

I developed a client/server simulation application. I deployed client and server on two different Windows XP machines. Somehow, the client is not able to send requests to the server.
I tried below options:
Pinged server machine successfully from client using ip-address.
Pinged client machine successfully from server using ip-address.
Checked netstat command line tool from both machines. Server is in LISTENING mode and client is in SYS_SENT mode. But the foreign address it is using to send is host name not the ip address.
Pinged server machine unsuccessfully using host name from client.
Pinged client machine successfully using host name from server.
I feel the problem is when the client is trying to connect to the server using the host name.
Could you please let me know how to force an application to use an ip address instead of a host name? Is there any other way to map the host name to an ip address?
Go to your client machine and type in:
nslookup server.company.com
substituting the real host name of your server for server.company.com, of course.
That should tell you which DNS server your client is using (if any) and what it thinks the problem is with the name.
To force an application to use an IP address, generally you just configure it to use the IP address instead of a host name. If the host name is hard-coded, or the application insists on using a host name in preference to an IP address (as one of your other comments seems to indicate), then you're probably out of luck there.
However, you can change the way that most machine resolve the host names, such as with /etc/resolv.conf and /etc/hosts on UNIXy systems and a local hosts file on Windows-y systems.
Try tracert to resolve the hostname. IE you have Ip address 8.8.8.8 so you would use; tracert 8.8.8.8
You could use a C function getaddrinfo() to get the numerical address - both ipv4 and ipv6.
See the example code here
This is hard to answer without more detail about the network architecture. Some things to investigate are:
Is it possible that client and/or server is behind a NAT device, a firewall, or similar?
Is any of the IP addresses involved a "local" address, like 192.168.x.y or 10.x.y.z?
What are the host names, are they "real" DNS:able names or something more local and/or Windows-specific?
How does the client look up the server? There must be a place in code or config data that holds the host name, simply try using the IP there instead if you want to avoid the lookup.
Windows XP has the Windows Firewall which can interfere with network traffic if not configured properly. You can turn off the Windows Firewall, if you have administrator privileges, by accessing the Windows Firewall applet through the Control Panel. If your application works with the Windows Firewall turned off then the problem is probably due to the settings of the firewall.
We have an application which runs on multiple PCs communicating using UDP/IP and we have been doing experiments so that the application can run on a PC with a user who does not have administrator privileges. In order for our application to communicate between multiple PCs we have had to use an administrator account to modify the Windows Firewall settings.
In our application, one PC is designated as the server and the others are clients in a server/client group and there may be several groups on the same subnet.
The first change was to use the functionality of the Exceptions tab of the Windows Firewall applet to create an exception for the port that we use for communication.
We are using host name lookup so that the clients can locate their assigned server by using the computer name which is composed of a mnemonic prefix with a dash followed by an assigned terminal number (for instance SERVER100-1). This allows several servers with their assigned clients to coexist on the same subnet. The client uses its prefix to generate the computer name for the assigned server and to then use host name lookup to discover the IP address of the assigned server.
What we found is that the host name lookup using the computer name (assigned through the Computer Name tab of the System Properties dialog) would not work unless the server PC's Windows Firewall had the File and Printer Sharing Service port enabled.
So we had to make two changes: (1) setup an exception for the port we used for communication and (2) enable File and Printer Service in the Exceptions tab to allow for the host name lookup.
** EDIT **
You may also find this Microsoft Knowledge Base article on helpful on Windows XP networking.
And see this article on NETBIOS name resolution in Windows.

Resources