Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
How open a port manually?
I know that if I install apache opens port 80, ssh opens port 22 and that I can change port number in your configuration files.
I was listening to people talk about open ports manually.
How can I make this process? When should I do it?
Thank you.
The question is bit vague. For example you open a port 'manually' if you write some code instructing doing so. By editing a configuration file (like for sshd), you did it 'manually'. You get a bunch of default opened ports by just booting Linux. Do you need all of them? How secure is having these ports opened?
How can I make this process? , When should I do it?
In simple: You should do it every time you need, like you did on SSH probably for Security through obscurity or disabling services/programs that you are not using (prevention).
A much better approach than messing around with a bunch of processes (at least at the beginning) is setting up a firewall like iptables, block everything and start discovering what you need or not need to be left opened. 'man nmap' is your friend also.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
Is there any Linux command/Bash script for wireless clients to know the number of clients connected to each WiFi SSID ? How can I do this in bash ?
I am not sure what you want to achieve, so I will give you several answers to point in different directions.
To get all SSIDs (including all public information) you can use the following ...
$ su
# iwlist scan
I hope this is what you looking for.
If not, then you maybe want to know how many active connections one service is carring. This is by far more complicated. To check for active connections you will need a port sniffler like tcpdump and huge knowlegde.
A more common way would be to access the log files or the protocol of the server, but I think you had not asked if you have the rights to do so.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I'm on Linux Mint, never connected to the internet for weeks, and still not connected, doing some python programming (Python 3.6).
I happened to look at the firewall program in it 'report' section and see this
(please not that the firewall was actually set to ALLOW outgoing until I changed it just before this screenshot (it was only set to block incoming). Again, to my knowledge I am not, and have not, been connected to the internet at all and my networking is turned off.:
I'm not a network programmer, but this seems to be showing that these applications have been accessing network ports, correct?
Why would python 3.6 (which I was using) be on this list or ever need to connect to any port at all?? Am I looking at nefarious activity here?
I've heard that software can be placed directly on the hardware of a system. IS it possible that my network interface card could be activated and used without giving any indication?
And again, why would my python 3.6 application be on a firewall report at all?
I'm very concerned about this. Can someone enlighten me?
What you are looking at are mostly servers that are listening for incoming connections. That certainly covers ntpd, cups, ntpd.
It looks like some python programs have also been listening for connections, maybe as part of your programming exercises.
The fact that programs are listening for incoming connections doesn't mean anything has actually connected to them, or even that anything could.
An address of "*" indicates that it's a potential connection, not an actual connection that happened.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 6 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I have a number of machines which I would like to check using my Nagios box. They sit behind a machine which is reachable from my Nagios box; all are running Linux. These machines have no routing to outside networks. If I need to reach the machines manually I either ssh to the intermediate box and then ssh to the other machines, or I'll use ssh to forward a port.
I usually use SNMP for most of my checks. So my thought is that prior to my Nagios box running a check I could have it run a command to forward the needed port, then get rid of the forward when done. Can anyone guide me on the best way to do this?
Thanks!
You probably want to look into Nagios passive checks. As described in the documentation:
Passive checks are useful for monitoring services that are:
Asynchronous in nature and cannot be monitored effectively by polling
their status on a regularly scheduled basis
Located behind a firewall and cannot be checked actively from the monitoring host
Your use case is pretty clearly the second one.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
Running a Debian server and would like to install Ruby but it's taking almost an hour on "compiling", and I can never keep my SSH connection up for so long.
I was hoping to SSH into the server, running the installation command and leave it running on the server once I close my SSH connection, and be able to check back on it later.
Is there a way to do that?
Please and thank you in advance!
Repeating myself, but I am writing an answer so it can be marked as accepted/solved :)
Learn about screen and/or tmux! You won't regret it. tmux is newer and better. stackoverflow.com/questions/70661/what-is-gnu-screen
screen/tmux let's you keep a remote terminal session running that you can connect/reconnect to - I always start long running tasks in a screen in case my connection drops (or in case I wanna leave the office and go home ;) ).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I use an Linux Server for nat device.
Currently it looks like [PC1,2,3]--[Linux]--[Internet]
There is no issue at all , but I'm curious about , when I open a service (ex: FTP WWW ) on my PC1 , did my [Linux] also opened a port service on it ?
I did trace code for the
CONFIG_NF_CONNTRACK_FTP
CONFIG_NF_NAT_FTP
but I cant find related code about port open.
Thanks for your read.
There are various techniques used the make a router/firewall automatically forward ports to its clients. For example there are some protocols like: IGD, NAT-PMP et similia.
But those protocol need to be implemented both on router and on client. So automatic port-mapping won't work out of the box in many cases.
The lines in kernel config you are referring to CONFIG_NF_CONNTRACK_FTP CONFIG_NF_NAT_FTP are used for another reason: due to the fact that FTP protocol use two different tcp streams for comunication (one of which does not have to be "listened" by the server) your firewall needs extra "effort" to track the connection and act accordingly.