Solved

how to enable ports via command line ?

Posted on 2008-10-20
4
904 Views
Last Modified: 2013-11-05
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.
0
Comment
Question by:stech08
  • 2
  • 2
4 Comments
 
LVL 31

Expert Comment

by:Henrik Johansson
ID: 22763328
Run the following command:
sc stop ipnat

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

Author Comment

by:stech08
ID: 22763354
I recieved the following message:

"[SC] ControlService FAILED 1062:

The service has not been started."

thanks though.. anything else i can do?
0
 
LVL 31

Accepted Solution

by:
Henrik Johansson earned 500 total points
ID: 22765031
Reset TCP/IP configuration with the following command and reboot. Make sure you have DHCP available for that subnet before rebooting. Otherwise, you nead to go and find the console when the server doesn't have IP-address configured after reboot.

netsh int ip reset
0
 

Author Closing Comment

by:stech08
ID: 31508044
That did it, I cant thank you enough.
I had to restart and it worked.

Thanks again.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question