LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-06-2005, 12:00 PM   #1
vous
Member
 
Registered: Mar 2003
Location: Macondo
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
Posts: 380

Rep: Reputation: 30
Openning a port...doesn't work?!


Hello All,

I'm trying to open a port: 4900.

I have edited my /etc/services file by adding these two entries:

MyApp 4900/tcp
MyApp 4900/udp

I also have an application up and running that listens on this port.

When I check it with nmap:

# nmap -sS localhost

I don't see the port listed as open....????

Am I missing a step?

Any thoughts?
 
Old 04-06-2005, 12:14 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Do you see the port in use when you run:
netstat -nlp

Do you have a firewall running?
iptables -nL
 
Old 04-06-2005, 12:22 PM   #3
vous
Member
 
Registered: Mar 2003
Location: Macondo
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
Posts: 380

Original Poster
Rep: Reputation: 30
netstat -nlp | grep 4900

tcp 0 0 :::4900 :::* LISTEN 6562/java

>>>>

iptables -nL | grep 4900

ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:4900
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports x,x,x,x,x,x,x,4900


So I assume this part looks good...is it?
 
Old 04-06-2005, 12:40 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
It should be so long as there are no other rules blocking it.
 
Old 04-06-2005, 01:01 PM   #5
vous
Member
 
Registered: Mar 2003
Location: Macondo
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
Posts: 380

Original Poster
Rep: Reputation: 30
What "other" rules would there be?

If I have checked with netstat that the port is open and listening; and if I have checked the rules of the firewall(kernel)....what other rules or configs would I need to check in order to open that port?

Question 2 is...the check that I did with nmap, is that the right way to check the status of your ports to the outside world?
 
Old 04-06-2005, 01:03 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
There may be other iptables rules.

nmap should be fine although results can sometimes be deceiving across some WANs and just because something is listening on a loopback address doesn't mean to say it is listening on specific network adresses..
 
Old 04-06-2005, 01:05 PM   #7
vous
Member
 
Registered: Mar 2003
Location: Macondo
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
Posts: 380

Original Poster
Rep: Reputation: 30
How do I find out if there are other iptable rules AND how do I find out if there are "other" types of rules?

What other rules could overrule what is set by the services file and the firewall settings?
 
Old 04-06-2005, 01:11 PM   #8
vous
Member
 
Registered: Mar 2003
Location: Macondo
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
Posts: 380

Original Poster
Rep: Reputation: 30
By the way, I'm running nmap locally (obviously cause I'm using localhost as a parameter) and I only have one NIC.
 
Old 04-09-2005, 12:51 PM   #9
vous
Member
 
Registered: Mar 2003
Location: Macondo
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
Posts: 380

Original Poster
Rep: Reputation: 30
So, any thoughts why this is not working?

Anybody??
 
Old 04-09-2005, 02:45 PM   #10
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,564

Rep: Reputation: 124Reputation: 124
Just test your net app without firewall :

iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -F
iptables -X

Then try nmap localhost
 
Old 04-09-2005, 11:29 PM   #11
aznluvsmc
Member
 
Registered: Aug 2004
Location: Newmarket, Ontario
Distribution: OpenSuse 10.2
Posts: 184

Rep: Reputation: 30
Try the following Nmap command:

># nmap -sS -p 4900 ip_address

I don't think 4900 is a port that's scanned by nmap automatically so you may have to specify it. Also the IP address should be the address that other computers will use to contact you.
 
  


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
Openning ports - 587 ziphem Linux - Newbie 10 08-17-2005 08:14 AM
openning ports zaicheke Slackware 4 01-16-2005 08:36 PM
Problem openning browser Wolvastur Linux - Newbie 1 01-07-2005 08:57 AM
Openning Port need Help jadid Linux - Networking 4 11-30-2004 11:42 PM
openning port 22 for ssh krzykard Linux - Security 4 10-22-2003 09:08 AM


All times are GMT -5. The time now is 07:39 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration