Solved

how to enable ports via command line ?

Posted on 2008-10-20
4
902 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now