ports interview questions
Top ports frequently asked interview questions
Pretty self-explanatory. Is there any way I can make Apache stop listening in port 443 (Https). So that it only listens on port 80 (http)?
I'm working on a Windows 7 PC.
Edit 1: I installed Apache with XAMPP. So i don't know how it came pre-configured.
Solution: There is a file in "\apache\conf\extra" called http-ssl.conf that had a command saying "Listen 443" (line 20). Just change it, delete it, or add a # before it to solve the issue.
Source: (StackOverflow)
I would like to listen to HTTP traffic on port 8080. When I start capturing packets in Wireshark, it's flooded by packets using the SSDP protocol on port 1900. I would like to limit the packet capturing to only HTTP or maybe only HTTP on port 8080. How can I do this in Wireshark?
On File > Preferences...
and under Protocols
I have removed the 1900 port from HTTP and 8080 is already there.
I have typed http
in the "Filter" textfield, but it doesn't seem to have any effect.
Source: (StackOverflow)
I have an application that communicates via SSL, however, Port 443 is already in use by an IIS instance on that same server. Can I use another port other than 443 for SSL communication?
Source: (StackOverflow)
I wanted to know if there is a range which is usually used for destination port that is used in traceroute command. Like the starting address for destination port is 33434. but is there some standard range which is preferred for traceroute ?
Source: (StackOverflow)
I have put private server on Debian, I would like to be able to send mail but port 25 is blocked by my ISP. I checked it by opening a telnet connection to another mail server.
The good news is that I have an open port 587 on which you are connected to an external mail server.
How to set the server to send mail on port 578 instead of 25.
Please help!
Source: (StackOverflow)
I need a Linux command to list all free open ports for use in an application
lsof -i TCP| fgrep LISTEN
Does not seen to be helping as the Ports it lists are not necessarily free for use. How do I list free open ports not in use?
Source: (StackOverflow)
When running netstat -a on my local machine, i see ports on the 0.0.0.0 address listening. I would assume that 0.0.0.0 is my local machine, except that i also see 127.0.0.1 listening to specific ports.
What is the 0.0.0.0 address? What is the difference between 0.0.0.0 and 127.0.0.1?
Below is an example of the output:
Proto Local Address Foreign Address State
TCP 0.0.0.0:445 MyComputer1:0 LISTENING
TCP 0.0.0.0:49156 MyComputer1:0 LISTENING
TCP 0.0.0.0:49157 MyComputer1:0 LISTENING
TCP 127.0.0.1:6999 MyComputer1:0 LISTENING
TCP 127.0.0.1:6999 MyComputer1:49801 ESTABLISHED
TCP 127.0.0.1:6999 MyComputer1:57172 TIME_WAIT
Source: (StackOverflow)
I'm using Amazon EC2 micro instance with Ubuntu 11.04 on it (official AMI by Canonical). I have created a new security group for this instance:
Inbound:
22 (SSH) 0.0.0.0/0
80 (HTTP) 0.0.0.0/0
443 (HTTPS) 0.0.0.0/0
3306 (MYSQL) 0.0.0.0/0
8080 (HTTP*) 0.0.0.0/0
27017 0.0.0.0/0
27018 0.0.0.0/0
27019 0.0.0.0/0
28017 0.0.0.0/0
But when I start the web server on 8080 and try to open http://ec2-ip-address:8080/
in my browser it says
Server Not Found
… with the standard Google Chrome page.
netstat -anltp | grep "LISTEN"
says that my only port listened at is 22.
How can I open the listed ports so I can start my web projects?
EDIT: The solution has been found. All you need is to start server at 0.0.0.0 IP address, not 127.0.0.1 or localhost.
Source: (StackOverflow)
I mean, if someone is downloading a file from me, doesn't that means that I'm the host and he is connecting to me?
Or am I connecting to him?
Either way one of us need an open port, no?
I don't have any open port routing to my computer in my router, so how is that I'm accepting connections?
Source: (StackOverflow)
I need help on finding out how to disable any particular TCP/IP port on a Windows box whenever a need arises.
I googled before posting the question and I got links to articles mentioning only
- disabling services for a particular port
- disabling net bios ports
- port forwarding on a router
- etc
But none of these topic cover what I'm looking for.
Source: (StackOverflow)
Simple question: I have a NATed Linux at home that hosts a couple of samba shares.
What Ports should I forward from the router to the Linux box so as to be able to access those shares from the internet with windows explorer (a la "\my.dyndns.org\shares\xxx" style)?
I want the minimum number of port openings that I should do in the router config to have read/write functionality.
EDIT: Client machine is a Vista one
Source: (StackOverflow)
I thought a web server process I brought up was listening on localhost:8080, and tried to connect to it, but kept getting connection reset errors. As it turns out, I was mistaken and my process was listening on a totally different port.
What I can't understand, however, is why I was getting the connection reset errors, rather that "connection refused" that you'd normally get if no process was listening on that port. There isn't anything else listening on 8080 as far as I can tell:
$ sudo lsof -i -P | grep 8080
# no result
$ sudo netstat -a -n | grep 8080
# still no result
Yet connections to this port are initially accepted (although closed on further data):
$ /usr/local/bin/wget localhost:8080
--2014-01-14 16:29:22-- http://localhost:8080/
Resolving localhost... ::1, 127.0.0.1, fe80::1
Connecting to localhost|::1|:8080... failed: Connection refused.
Connecting to localhost|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... No data received.
Similarly with telnet:
$ telnet localhost 8080
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Trying other random ports just results in the expected connection refused error:
$ telnet localhost 8081
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying fe80::1...
telnet: connect to address fe80::1: Connection refused
telnet: Unable to connect to remote host
My hosts file is bare bones:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
Source: (StackOverflow)
I am trying to create something like a cloud where I will be able to connect to a device from other networks, apart from my local one. In order to do that my provider must unblock some ports... My question is what are the actual dangers of this? Can an outsider actually "hack" me and take personal data or something? And is there any easy way to avoid that?
Source: (StackOverflow)
Is it possible to allow user to bind only certain ports?
For example, I was trying to achieve this:
- user1: can bind only on ports 4001 and 4002
- user2: can bind only on ports 5001 and 5002
- and so on...
I have searched for a solution for a long time using SElinux or apparmor but nothing seems to work as these tools can only set rules to certain executables (correct me if i am wrong).
Source: (StackOverflow)
I have a small home network and I'm trying to balance the need for security versus convenience. The safest way to secure internal web servers is to only connect using VPNs but this seems overkill to protect a DVRs remote web interface (for example).
As a compromise, would it be better to use very large ports numbers? (eg. five digits up to 65531)
I've read that port scanners typically only scan the first 10,000 ports so using very high port numbers is a bit more secure.
Is this true?
Are there better ways to protect web servers? (ie. web guis for applications)
Source: (StackOverflow)