Find the answer to your Linux question:
Results 1 to 4 of 4
hi i have centos5.3 installed with iptables firewall, i want to open port 5222 as i want to access application which uses port 5222 from internet, i open port , ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2010
    Posts
    5

    how to open port


    hi
    i have centos5.3 installed with iptables firewall, i want to open port 5222 as i want to access application which uses port 5222 from internet, i open port , but shill not shows port open 5222 i manage internet through squid server i also allow this port in squid acl but still not shown open pls find the iptables output
    pls find the output of iptables -L -v

    Chain INPUT (policy ACCEPT 16824 packets, 1413K bytes)
    pkts bytes target prot opt in out source destination
    23624 2301K LOG all -- eth0 any anywhere anywhere LOG level debug prefix `BANDWIDTH_IN:'
    7357 975K ACCEPT tcp -- eth0 any anywhere anywhere state NEW,RELATED,ESTABLISHED tcp dpt:squid
    0 0 ACCEPT tcp -- eth1 any anywhere anywhere tcp spt:squid state RELATED,ESTABLISHED
    11612 14M ACCEPT tcp -- eth1 any anywhere anywhere state RELATED,ESTABLISHED tcp spt:http
    0 0 ACCEPT tcp -- eth1 any anywhere anywhere tcp dptmpp-client

    Chain FORWARD (policy ACCEPT 2953 packets, 949K bytes)
    pkts bytes target prot opt in out source destination
    2953 949K LOG all -- any eth0 anywhere anywhere LOG level debug prefix `BANDWIDTH_OUT:'
    2816 556K LOG all -- eth0 any anywhere anywhere LOG level debug prefix `BANDWIDTH_IN:'
    2816 556K ACCEPT all -- eth0 any anywhere anywhere

    Chain OUTPUT (policy ACCEPT 46818 packets, 50M bytes)
    pkts bytes target prot opt in out source destination
    46266 50M LOG all -- any eth0 anywhere anywhere LOG level debug prefix `BANDWIDTH_OUT:'
    9699 1155K ACCEPT tcp -- any eth1 anywhere anywhere state NEW,RELATED,ESTABLISHED tcp dpt:http
    0 0 ACCEPT tcp -- any eth0 anywhere anywhere state RELATED,ESTABLISHED tcp spt:htt

    pls help

    Regards
    Amar

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    How did you open the port?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Aug 2010
    Posts
    5
    hi

    iptables -I INPUT -p tcp --dport 5222 -j ACCEPT
    service iptables save
    service iptables restart

    Regards
    Amar

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Can you post the file /etc/sysconfig/iptables between CODE tags. Code tags are added with the '#' in the tool bar above.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

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