Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I was trying to open port 5000 in my fedora 13 server to run a custom application. From firewall I selected the Other ports Option. Then I add the ...
  1. #1
    Just Joined! amithad's Avatar
    Join Date
    Sep 2006
    Posts
    64

    Question Opening a Custom Port in Fedora 13

    Hi,

    I was trying to open port 5000 in my fedora 13 server to run a custom application. From firewall I selected the Other ports Option. Then I add the custom port 5000(commplex-main). SE Linux is in enforcing mode.

    but when i try to telnet from local machine to the port 5000 I get the following error

    telnet localhost 5000
    Trying ::1...
    telnet: connect to address ::1: Connection refused
    Trying 127.0.0.1...

    telnet: connect to address 127.0.0.1: Connection refused

    I have already installed telnet-server on the Server because of this error but that did not help

    could you help me on this matter please..



    N:B inbuilt services like httpd/ssh are working perfectly(can telnet and accessible from outside)
    Last edited by amithad; 12-10-2010 at 10:05 AM. Reason: to get attention of others

  2. #2
    Just Joined! amithad's Avatar
    Join Date
    Sep 2006
    Posts
    64

    Question Futher analysis

    by analysing the issue further I found the following details by typing the iptables -L command and viewing the details of the iptables
    -------------------------------------------------------------------------------------------------------------------
    iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
    ACCEPT icmp -- anywhere anywhere
    ACCEPT all -- anywhere anywhere
    ACCEPT all -- anywhere anywhere
    ACCEPT udp -- anywhere anywhere state NEW udp dpt:netbios-ns
    ACCEPT udp -- anywhere anywhere state NEW udp dpt:netbios-dgm
    ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
    ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:commplex-main
    REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination
    ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
    ACCEPT icmp -- anywhere anywhere
    ACCEPT all -- anywhere anywhere
    ACCEPT all -- anywhere anywhere
    REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
    --------------------------------------------------------------------------------------------------------------------------------

    # Firewall configuration written by system-config-firewall
    # Manual customization of this file is not recommended.
    *filter
    :INPUT ACCEPT [0:0]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
    -A INPUT -p icmp -j ACCEPT
    -A INPUT -i lo -j ACCEPT
    -A INPUT -i eth0 -j ACCEPT
    -A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
    -A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 5000 -j ACCEPT
    -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
    -A FORWARD -p icmp -j ACCEPT
    -A FORWARD -i lo -j ACCEPT
    -A FORWARD -i eth0 -j ACCEPT
    -A INPUT -j REJECT --reject-with icmp-host-prohibited
    -A FORWARD -j REJECT --reject-with icmp-host-prohibited
    COMMIT

    ~
    "/etc/sysconfig/iptables" 21L, 845C

  3. #3
    Just Joined! amithad's Avatar
    Join Date
    Sep 2006
    Posts
    64

    Thumbs up Got it right ;-)

    Hi All,

    Finally I found why I was not able to telnet to that particular port 5000. It's a small mistake to telnet you have to run the application first. While the application is running you can telnet to that port if you allow that port from the firewall.

    sorry to disturb you all

    Thanks

    Amitha

Posting Permissions

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