ow do I find out open tcp or udp network ports under OpenBSD operating systems using command line options?
Q. How do I fix an error, while restarting Apache ~ Address already in use: make_sock: could not bind to port 80?
A. If you are running SELinux disable temporary for port 80.
Apache Address already in use: make_sock: could not bind to port 80 error and solution
First make sure port 80/443 is not used by any other service or application with netstat command:
# netstat -tulpn| grep :80
If port 80 is bind to httpd, kill all process:
# killall -9 httpd
Now start the httpd:
# /etc/init.d/httpd start
Also make sure you are root while starting the httpd.
ow do I find open ports on Linux or FreeBSD Unix server?
Q. How do I find out what network service are running under Linux operating system?
A. For security reason it is necessary to find out what services are running. With the help of netstat command, you can print information about the Linux networking subsystem including running services. It can display program name and PID for each socket belongs to. Use netstat as follows:
$ netstat -atup
$ netstat -atup | grep LISTEN
- -t : Select all TCP services
- -u : Select all UDP services
- -a : Display all listening and non-listening sockets.
- -p : Display the PID and name of the program to which each socket belongs