Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am running RHAS 4.0 with Firewall disabled. My question is, if I have an application required to use certain port for the listener, would I have to open that port or the port will open it and listen to it as I run the application??? I can specify which port to use within the application. Of course, the corp. firewall will be open on the public IP address and then NAT to this Linux server.
It depends upon who you intend ... and who you intend to allow or disallow ... to "reach" that port.
If the traffic is to come in from the Internet, then your router must be told to offer a particular open-port to the Internet, and to direct all traffic from that port to "a particular port on a particular (inward-side) computer." Then, that computer must be prepared ... by firewalls and such ... to accept the connection.
If traffic is not to come from the Internet, then your router should receive no such instruction. It won't allow inbound, unsolicited connection requests to come in from the Internet to anyone at all. It is therefore "your first-line gatekeeper."
Nevertheless, on your internal network, any computer that is offering services to the internal net must have firewall-rules that permit the necessary connections to be made. Those rules should prohibit any connections (e.g. from the router) that should not be made.
It depends upon who you intend ... and who you intend to allow or disallow ... to "reach" that port.
If the traffic is to come in from the Internet, then your router must be told to offer a particular open-port to the Internet, and to direct all traffic from that port to "a particular port on a particular (inward-side) computer." Then, that computer must be prepared ... by firewalls and such ... to accept the connection.
If traffic is not to come from the Internet, then your router should receive no such instruction. It won't allow inbound, unsolicited connection requests to come in from the Internet to anyone at all. It is therefore "your first-line gatekeeper."
Nevertheless, on your internal network, any computer that is offering services to the internal net must have firewall-rules that permit the necessary connections to be made. Those rules should prohibit any connections (e.g. from the router) that should not be made.
Okay, I would like to understand more on this topic. Since I am not using the firewall functionality on the Linux server and my corporate firewall is modified to allow xxx.xx.xx:xxxx to get through and access the server. Yes, the connection is made from the WWW through the firewall with desinated port xxxx - Now, do I need to do anything from the server stand-point to answer on that particular port?? For an example: I would like to use port 9501 for an example, so the IP address should be xxx.xx.xxx:9501
The command that I used to see if anything running on that port is:
netstat -nap | grep 9501
And it came back with nothing. However, when I tried to talk to the port 9501 (command that I used, nc 9501) and it came back with "no port[s] to connect to". So, I typed service iptables status and it came back with "Firewall is stopped.".
I don't really understand if I can or can't use this port or when can I use this point.
The easiest way is to startup your app and see if it runs. Check its using the port you expect with the netstat cmd.
Then try to talk to it from outside. You can also use nmap to check if its visible.
If not, run the cmd
iptables -L
as root and post the results.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.