Link to home
Start Free TrialLog in
Avatar of stech08
stech08

asked on

how to enable ports via command line ?

I have a dedicated server that i used to be able to connect via remote desktop connection. However, I was trying to add a port number to be enabled and I beleive I accidentally shut down all ports.

I did that via control panel-> network connections -> properties of the connection there(Internet Connection (TCP/IP), then clicked on advanced and then under options tab, i clicked properties.

I selected permit only under tcp ports and added in port number. then rebooted the system.

so after that the web application that is on the server is not accessible and cant connect to it via remote connect.

however, I am able to connect to the server through sth called the serial console.

using the following code:
TcpScan.Connect("server", Port#);
it shows that port 80, 3389 as closed.

I have disabled the firewall and the ipsec service

so my question is how can i enable the ports via command line as thats the only way to connect to the server now, or what can be done to help establish connection again with the server.

thanks in advance.
Avatar of Henrik Johansson
Henrik Johansson
Flag of Sweden image

Run the following command:
sc stop ipnat

It's by default automatic, so it will start again at next reboot.
Avatar of stech08
stech08

ASKER

I recieved the following message:

"[SC] ControlService FAILED 1062:

The service has not been started."

thanks though.. anything else i can do?
ASKER CERTIFIED SOLUTION
Avatar of Henrik Johansson
Henrik Johansson
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stech08

ASKER

That did it, I cant thank you enough.
I had to restart and it worked.

Thanks again.