Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Access to the NSX FW #660

Open
aldowski opened this issue Oct 13, 2022 · 1 comment
Open

Access to the NSX FW #660

aldowski opened this issue Oct 13, 2022 · 1 comment
Labels

Comments

@aldowski
Copy link

Describe the bug

Hello;
I found multiple manuals and tutorials; did read most of those; anyway, still have issues to connect to NSX FW properly, getting different error messages.
In this case I am trying to automate NSX FW access and searching rules by different parameters, as mentioned, I cannot even connect to it (cannot using PowerNSX; at the other side browser access works).

The server is accessible:
PS C:\WINDOWS\system32> Connect-VIServer x.x.x.x -Credential (Get-Credential)
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:

Name Port User


x.x.x.x 443 NSXSERVERNAME\adminname

Reproduction steps

Regardless of next steps I am getting errors:

Connect-NsxServer -vCenterServer x.x.x.x
Connection to NSX server x.x.x.x failed : System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because connected host has failed to respond x.x.x.x:443

Or:
Connect-NsxServer -Server x.x.x.x (mentioned as deprecated)
or:
Connect-NsxServer -NsxServer x.x.x.x
Connection to NSX server x.x.x.x failed : Invoke-NsxRestMethod : The NSX API response received indicates a failure. 405 : Method Not Allowed : Response Body:

Expected behavior

Of course this is not a bug itself, it is not new feature request; I just wanted to get any answer, what and where needs to be checked (also, must say that the error 405 is not clearly mentioned at any suggestions, tutorials).

What is being expected = just connection to the end NSX FW server, if the connection is not allowed, why it's not. I am emphasizing that I have proper, full access to the NSX FW using browser (https, 443), same credentials I am using in PowerNSX attempts.

Additional context

The PowerNSX installed today, all commands listed, available as expected; using the
PS C:\WINDOWS\system32> gcm -Module PowerNSX.

I am checking usage with both hostname and IP address (anyway; I put one more line to Windows hosts file, just in case).

Is the NSX firewall rejecting access because of some specific settings; should anything be changed there?

@aldowski aldowski added the bug label Oct 13, 2022
@alagoutte
Copy link
Contributor

What version of Powershell do you are using ?
You use the Vcenter FQDN (or IP) not the NSX Manager IP ?

What do you if you try with -verbose ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants