| Server IP : 68.178.202.69 / Your IP : 216.73.216.174 Web Server : Apache System : Linux 69.202.178.68.host.secureserver.net 3.10.0-1160.139.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Nov 3 13:30:41 UTC 2025 x86_64 User : ikioworld ( 1005) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/opt/nydus/ops/customer_local_ops/operating_system/powershell/ |
Upload File : |
function Ensure-NetFirewallRule {
param($displayName, $direction, $action, $protocol, $localPort)
if(Get-NetFirewallRule -DisplayName $displayName -ea SilentlyContinue){
Remove-NetFirewallRule -DisplayName $displayName
}
New-NetFirewallRule -DisplayName $displayName -Direction $direction -Action $action -Protocol $protocol -LocalPort $localPort
}
Enable-PSRemoting -Force
"Configuring firewall"
Ensure-NetFirewallRule -DisplayName "winexe" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 139
netsh advfirewall firewall set rule name=winexe new localport=139,445
# Remove the blocks set up in the image by OH. NOTE: The spaces in the rule names are required. That's how
# the rules were created.
Remove-NetFirewallRule -DisplayName "Block TCP 139 " -ea SilentlyContinue
Remove-NetFirewallRule -DisplayName "Block TCP 445 " -ea SilentlyContinue
"Auto-restart Lanman Server on failure"
sc.exe failure LanManServer reset= 3600 actions= restart/5000/restart/10000/restart/5000
"Fix Lanman Server dependencies"
# SamSS=Security Accounts Manager; Srv2=SMB2 driver
sc.exe config lanmanserver depend= SamSS/Srv2
sc.exe start lanmanserver