LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-09-2007, 06:15 AM   #1
sharad
Member
 
Registered: Dec 2005
Posts: 48

Rep: Reputation: 15
How to open a port on linux


Hi all,
Could anybody please tell me how to open a port which is running an
unknown process.

For example, if I want to open a ftp port then its easy because we know the service whcih runs on that port. we can do this just by starting the service.

But, if I want to open a port say 44000, then how to go for it.

I executed following iptables rule for opening the port.

iptables -A INPUT -i eth0 -p tcp --sport 32769 -m state --state ESTABLISHED -j ACCEPT

but nmap is saying that the port is closed.

nmap -p 44000 -sS localhost

I would appreciate if you could answer to my query.


Thanks & Regards,

Sharad.
 
Old 01-09-2007, 06:40 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
An open port means that there is some application listening for connect requests on that port and responding when connect requests are detected. Configuring the firewall to allow connect requests on that port is the first step. The next step is to configure some software to do something when a connect request is received.
 
Old 01-09-2007, 07:32 AM   #3
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Quote:
Originally Posted by sharad
I executed following iptables rule for opening the port.

iptables -A INPUT -i eth0 -p tcp --sport 32769 -m state --state ESTABLISHED -j ACCEPT

but nmap is saying that the port is closed.

nmap -p 44000 -sS localhost
Sharad i really first of all dont see any sense in the inter-connection of these two commands. Second iptables only stand infront of your service(port) & nothin else. It doesnt open or close a port; it actually do the filtering part. You got to run the service at your box if you want to open the port.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
OPen a specified port on linux lieuquocdat Linux - Software 1 08-06-2006 07:39 PM
Open Port - Linux Firewall - IPtables SBFree Linux - Networking 1 05-12-2006 07:03 AM
how to open a rare port in linux arnab_pal Linux - Networking 3 03-29-2006 03:32 PM
linux : cannot open port 1443 ppa Linux - Networking 2 01-18-2006 02:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration