Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Port Open for Connection or Not
Results 1 to 8 of 8

Thread: Port Open for Connection or Not

Hybrid View

  1. #1
    Member honey bee's Avatar
    Join Date
    Feb 2006
    Location
    Pakistan
    Posts
    146

    Question Port Open for Connection or Not

    Hello!

    How can i check in linux that a specific port is open to establish a connection or not?

  2. #2
    You can use nmamp on your own ip address. That will tell you what is open.

    try
    Code:
    man nmap
    for more details.
    My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive.

  3. #3
    What port are you looking for? Are you sure it's listening? To check to make sure your server is for sure listening:

    netstat -l | more

    Look for your port in the Local Address column. i.e. "localhost:http"

    If it's a TCP port (most likely is, unless you are running TFTP, a VPN, and other UDP based services) you can test outside a box with telnet. For a web server:

    telnet <your server IP> 80

    If you decide to use nmap, to make it easy on you; you might want to do a SYN scan (FIN scans work, but really doesn't tell you if the port is truely open).

    Once again for a webserver HTTP port:

    nmap -sS -P0 -p 80


    If you are having issues with your firewall, be sure to have your port open from any to the destination, and that you are allow localhost to get out, or at least have established connections allowed to continue (I'll type out some commands if this is an issue).
    arrogance breeds ignorance


    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

  4. #4
    Member honey bee's Avatar
    Join Date
    Feb 2006
    Location
    Pakistan
    Posts
    146
    When i used :

    netstat -l | more

    I can see that port.With netstat -a | grep LISTEN, i get that port with listen status, i think it means that the port is open for connection.

    But when i "telnet ip port" from any other system , its not connecting.I am trying to connect from windows to linux.Firewall is enabled at linux end, is there any possibility that it is causing the problem?

  5. #5
    Most likely. You need to allow access to that particular post.
    My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive.

  6. #6
    Can you post the results from 'iptables --list' and the service you are trying to access? I'd be more than happy to write out some firewall rules for you.
    arrogance breeds ignorance


    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

  7. #7
    Member honey bee's Avatar
    Join Date
    Feb 2006
    Location
    Pakistan
    Posts
    146
    Thanks a lot for the reply.The problem was at the end of one of our clients and he has managed to handle it.But still i want to know, if i've firewall enabled by default and i want to enable any particular port, suppose 8787 for connection, what should i do?

  8. #8
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811
    Code:
    # iptables -I INPUT --dport 8787 -j ACCEPT
    to allow any incomming connection on that port, beeing tcp or udp from any IP addressed to any ip...
    Now you weren't beeing specific as to other limitations...
    Don't worry Ma'am. We're university students, - We know what We're doing.
    'Ruiat coelum, fiat voluntas tua.'
    Datalogi - en livsstil; Intet liv, ingen stil.

Similar Threads

  1. How to open port 80 without having to start httpd ?
    By naruponk in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 07-26-2009, 06:46 AM
  2. manually open ports in Internet Connection Firewal
    By CoolJsa14 in forum Windows - General Topics
    Replies: 0
    Last Post: 01-05-2005, 09:58 PM
  3. how to stop a connection to a specific UDP/TCP port?
    By aromes in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 03-15-2004, 12:35 AM
  4. SAMBA: What port should I open?
    By Compunuts in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 08-13-2003, 08:42 PM
  5. Connection refused to port 25
    By asaf in forum Linux - General Topics
    Replies: 6
    Last Post: 07-12-2002, 09:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •