Solved

how to enable ports via command line ?

Posted on 2008-10-20
4
907 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Hello to you all, I hear of many people congratulate AWS (Amazon Web Services) on how easy it is to spin up and create new EC2 (Elastic Compute Cloud) instances, but then fail and struggle to connect to them using simple tools such as SSH (Secure…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

691 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