I want to set up a 4.0.4 RavenDB through its setup wizard but it keeps saying that my port 443 isn't open.
Error Message
In my Settings I've double-checked the IP adresses.
192.168.1.28 is my computer.
Everything's fine. 38889 was just a test.
In my Firewall port settings, everything looks ok : NAT/PAT
Same thing with the Windows Firewall
Btw, before you link it to me, I've already read
https://ravendb.net/docs/article-page/4.0/csharp/server/security/common-errors-and-faq
If anyone could help, i'd provide lifetime gratitude :)
Thank you in advance for every answer.
This usually means that something is holding on to that port.
This is frequently Skype or IIS.
Here is how you can figure it (PowerShell):
PS C:\> Get-Process -id (Get-NetTCPConnection -LocalPort 443).OwningProcess
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName
------- ------ ----- ----- ------ -- -- -----------
1855 78 136472 76416 2,115.61 12812 1 Skype
On My Machine, you can see that Skype is indeed holding this port open. You can change that using:
Related
I have a dedicated server with hyper-v core 2019.
I installed Windows Admin Center on my windows 10 client.
It works fine except the transfer file function. i can read remote disks and create folder but when i try to upload file, the bar progress stay at 0% and nothing happens.
I have create a rule on firewall who accepts all traffic for my ip adress.
Someone could help me please?
thanks for advance
Daniel
It's a known issue with Windows Admin center. (assuming you are trying to upload a file of more than 100Mb)
See: https://learn.microsoft.com/en-us/windows-server/manage/windows-admin-center/support/known-issues#files
Still very much a work in progress...
You have to open a specific port to make this work.
You can verify this by temporarily disabling the firewall with this powershell command:
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False // Disable firewall
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True // Re-enable
I had once found this port (don't even ask how...), nagged to the people writing the documentation for MS, they pointed me to a corner on the internet that the port was mentioned, but now I still can't find it! This is outrageous...!
Update:
OK, I found it again! It is port 445!
And here is the documentation link: Port configuration on the target server
Turns out you need to know the port in advance to find it! (lol)
Here is a script to do this:
New-NetFirewallRule -DisplayName "__Allow_File_UploadDownload" -Direction Inbound -LocalPort 445 -Protocol TCP -Action Allow -RemoteAddress 192.168.1.5
(Note: Replace "192.168.1.5" with a whitelisted IP)
I'm not even sure if this is a programming issue or something strange in Windows
I am creating a script in PowerShell 4.0 to automate the setting up of a Windows 6in4 tunnel.
The script is working successfully on my machine however when someone else using the same version tries it, the script fails for them.
The sticking point appears to be here
# First Locate Which device is the Ethernet Adapter
$wiredAdapter = Get-NetAdapter | Where-Object {$_.PhysicalMediaType -eq '802.3'}
This line is supposed to get the adapter properties of the Ethernet adapter (On both mine and the other individuals system there is only one)
On my system if I run the line and then output the results I get the following
PS C:\Users\Timothy> $wiredAdapter
Name InterfaceDescription ifIndex Status MacAddress LinkSpeed
---- -------------------- ------- ------ ---------- ---------
Ethernet Qualcomm Atheros AR8131 PCI-E Gigabi... 3 Up xx-xx-xx-3B-22-78 100 Mbps
However when he tries copying the line directly he gets no output.
Can anyone suggest what's going wrong here?
Thanks in advance.
On my system Get-NetAdapter returns as I'd expect
The same as $ Wired above
PS C:\Users\Timothy> Get-NetAdapter
Name InterfaceDescription ifIndex Status MacAddress LinkSpeed
---- -------------------- ------- ------ ---------- ---------
WiFi 3 Atheros AR5007UG Wireless Network Ad... 13 Disconnected 00-1D-0F-B1-82-B9 0 bps
Ethernet Qualcomm Atheros AR8131 PCI-E Gigabi... 3 Up F4-6D-04-3B-22-78 100 Mbps
If I then do (Get-NetAdapter).PhysicalMediaType I get the following
PS C:\Users\Timothy> (Get-NetAdapter).PhysicalMediaType
Native 802.11
802.3
I chose PhysicalMediaType as I was getting strange results off the media type for the Wireless Adapters.
PS C:\Users\Timothy> (Get-NetAdapter).MediaType
802.3
802.3
Still can't figure out why I get this result.
Thanks guys - the problem is that the other system returns different values for the Ethernet card. What's annoying is that the card is the same model as mine
Native 802.11
Unspecified
Unspecified
Unspecified
Unspecified
Unspecified
Unspecified
I did come across the following page using the Get-WMIObject.
http://gallery.technet.microsoft.com/scriptcenter/PowerShell-Script-to-889c9505
However using that my wireless adapters were enumerated as wired adapters :(
Server Win 2012 (not r2)
I want to replace some DHCP reservation's mac address only in a single scope. Preferably using a txt/csv and matching on PC name.
I was loooking at the DHCP options in powershell and it looks like i have to delete the Reservation and re-add it.
Does anyone know how I can replace the DHCP Reservation MAC address for an IP using 'Power-shell'?
Eg: ip=10.10.10.1
Name = Computer1`
MAC = 00-01-02-03-04 change this value only 00-02-03-05-06
Thanks
Roger
In Windows 2012+ there is a DHCP Server module for PowerShell. Check out this function:
Set-DhcpServerv4Reservation
A simple search for "dhcp server powershell" would have found you the module as the firs result, and "dhcp server reservation powershell" would even give you a blog with samples.. Please show some effort first.
I am trying to set up remote management on a few machines. I can successfully execute commands on the remote machine from my computer, but I don't want anyone to be able to do so.
I have tried setting the trusted hosts on the remote computer, and restarted the service but it doesn't seem to be doing anything.
For example, on the remote machine:
winrm set winrm/config/client '#{TrustedHosts="someIncorrectName"}'
I then restart the winrm service.
How come I can still run the remote commands from my laptop? Shouldn't it prevent the command from being executed?
I'm running the command the following way:
Invoke-Command -cn remoteMachine -Credential $cred -scriptblock {get-process}
Where $cred was generated using get-credential domain/username.
I have read a few things about TrustedHosts, and they seem to give conflicting reports as to what it does. Some people seem to say that it prevents commands from being executed on computers not listed in the Trusted Hosts list. Others say it's a list of computers that can run commands on that machine.
MSDN says: "Specifies the list of remote computers that are trusted." That seems to imply that it is the second option (a list of computers that can execute commands on the machine).
What am I doing wrong?
Thanks
TrustedHosts doesn't do what you think it does. Unlike Unix .rhosts, this setting is for the PowerShell client, not the remote server endpoint. This is why it's found at:
WSMan:\localhost\Client
If it was relevant to the listener, it would be under the Service node.
As the other answer touches on, this is typically used in non-domain or mixed environments to prevent your client from sending an NTLM challenge-response or basic authentication attempt to an untrusted remote machine. Why? Because a remote rogue server may capture this information and use it to compromise your network. When you're in a mixed environment, the only protection available is SSL and many may opt to disable this through AllowUnencrypted = $false, again in the Client node of the WSMAN drive.
So, how do you limit incoming connections? You should have made the connection by now and started to look under the WSMAN:\localhost\Service node on the remote server. If you do this, you'll see:
WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Service
Type Name SourceOfValue Value
---- ---- ------------- -----
System.String RootSDDL ...
System.String MaxConcurrentOperations 4294967295
System.String MaxConcurrentOperationsPerUser 1500
System.String EnumerationTimeoutms 240000
System.String MaxConnections 300
System.String MaxPacketRetrievalTimeSeconds 120
System.String AllowUnencrypted false
Container Auth
Container DefaultPorts
System.String IPv4Filter *
System.String IPv6Filter *
System.String EnableCompatibilityHttpList... false
System.String EnableCompatibilityHttpsLis... false
System.String CertificateThumbprint
System.String AllowRemoteAccess true
Now, looking down this list, you'll see some pertinently named properties like IPv4Filter and IPv6Filter. Guess what these do ;-)
I am using Windows XP Sp3. We are having both wired network and wireless network.
Both will have different IP address range .
Is there any way to find which IP address/Gateway is used to communicate?
i.e. We are having permission to wired network IP range to rdp to our lab machines. But with wireless connection we can't.
Often people forget that and asking me.
If the wireless network is active channel , then it should either try to connect through wired network or it should intimate them. How to achieve this using powershell?
You can get the same information route print shows like this:
Get-WmiObject -Class Win32_IP4RouteTable | select Destination, Mask, NextHop, Metric1
If your network address is 10.0.0.0 you can get the NextHop IP like this:
Get-WmiObject -Class Win32_IP4RouteTable | ? {$_.Destination -eq "10.0.0.0"} | select NextHop
As I understand you should manually add routes to lab machines for wired interface. And you could detemine current route settings with command:
route print
running from windows console (cmd )
Guess this links could be also helpfull to you:
Configure default gateway
Usage route command
Adding static IP route