LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
 
LinkBack Search this Thread
Old 03-30-2010, 02:15 PM   #1
tom_sawyer70
LQ Newbie
 
Registered: Jul 2009
Posts: 21

Rep: Reputation: 1
RHEL - cannot open port


I am running RHEL 5.3 and attempted to open port 4470 for an application that will use the port. I used the graphical interface to open the port, just as I have for other ports such as 4750.

I can telnet to the server with:
telnet server 4750

If I try the other port that I'm trying to open:
telnet server 4470

I get "Could not open connection to the host, on port 4470: Connect failed."

I have restarted the network and iptables services.
I have turned off the local firewall and it still did not work.

Here is my /etc/sysconfig/iptables file:

# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 161 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1972 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 2035 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 2036 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4470 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4750 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT

What else should I check or verify?

TIA,
Dave
 
Old 03-30-2010, 03:21 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 163Reputation: 163
what do you get when you do a 'netstat -plan'?
 
Old 04-05-2010, 12:04 PM   #3
tom_sawyer70
LQ Newbie
 
Registered: Jul 2009
Posts: 21

Original Poster
Rep: Reputation: 1
netstat -plan gives:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:199 0.0.0.0:* LISTEN 20161/snmpd
tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 2501/exim
tcp 0 0 0.0.0.0:4750 0.0.0.0:* LISTEN 2547/rscd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2050/portmap
tcp 0 0 0.0.0.0:1008 0.0.0.0:* LISTEN 2098/rpc.statd
tcp 0 0 0.0.0.0:2033 0.0.0.0:* LISTEN 2673/uscmd1
tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 2501/exim
tcp 0 0 0.0.0.0:2034 0.0.0.0:* LISTEN 2673/uscmd1
tcp 0 0 127.0.0.1:4470 0.0.0.0:* LISTEN 30015/p_ctsce
tcp 0 0 127.0.0.1:4471 0.0.0.0:* LISTEN 30015/p_ctsce
tcp 0 0 0.0.0.0:1975 0.0.0.0:* LISTEN 2673/uscmd1
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 2501/exim
tcp 0 0 0.0.0.0:24346 0.0.0.0:* LISTEN 2461/xinetd
tcp 0 0 :::587 :::* LISTEN 2501/exim
tcp 0 0 :::465 :::* LISTEN 2501/exim
tcp 0 0 :::22 :::* LISTEN 17957/sshd
tcp 0 0 :::25 :::* LISTEN 2501/exim
udp 0 0 0.0.0.0:58783 0.0.0.0:* 20161/snmpd
udp 0 0 0.0.0.0:161 0.0.0.0:* 20161/snmpd
udp 0 0 0.0.0.0:41289 0.0.0.0:* 20161/snmpd
udp 0 0 0.0.0.0:39777 0.0.0.0:* 20161/snmpd
udp 0 0 0.0.0.0:45672 0.0.0.0:* 20161/snmpd
udp 0 0 0.0.0.0:1002 0.0.0.0:* 2098/rpc.statd
udp 0 0 0.0.0.0:1005 0.0.0.0:* 2098/rpc.statd
udp 0 0 0.0.0.0:111 0.0.0.0:* 2050/portmap
udp 0 0 10.18.22.116:123 0.0.0.0:* 14564/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 14564/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 14564/ntpd
udp 0 0 fe80::250:56ff:fe83:123 :::* 14564/ntpd
udp 0 0 ::1:123 :::* 14564/ntpd
udp 0 0 :::123 :::* 14564/ntpd
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 45666128 20161/snmpd /var/agentx/master
unix 2 [ ACC ] STREAM LISTENING 7943 2519/gpm /dev/gpmctl
unix 2 [ ACC ] STREAM LISTENING 8321 2626/hald @/var/run/hald/dbus-wAh6GovtcJ
unix 2 [ ACC ] STREAM LISTENING 5982 1657/mcstransd /var/run/setrans/.setrans-unix
unix 2 [ ACC ] STREAM LISTENING 6416 1969/audispd /var/run/audispd_events
unix 2 [ ACC ] STREAM LISTENING 7098 2068/python /var/run/setroubleshoot/setroubleshoot_server
unix 2 [ ACC ] STREAM LISTENING 7363 2332/dbus-daemon /var/run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 7556 2407/acpid /var/run/acpid.socket
unix 14 [ ] DGRAM 6507 2008/syslogd /dev/log
unix 2 [ ] DGRAM 1500 437/udevd @/org/kernel/udev/udevd
unix 2 [ ] DGRAM 8329 2626/hald @/org/freedesktop/hal/udev_event
unix 2 [ ACC ] STREAM LISTENING 8236 2579/xfs /tmp/.font-unix/fs7100
unix 2 [ ACC ] STREAM LISTENING 8320 2626/hald @/var/run/hald/dbus-xHPW6yhNNh
unix 2 [ ] STREAM CONNECTED 55551067 2407/acpid /var/run/acpid.socket
unix 2 [ ] STREAM CONNECTED 55031057 2407/acpid /var/run/acpid.socket
unix 2 [ ] DGRAM 55007978 1967/auditd
unix 2 [ ] STREAM CONNECTED 53831313 2407/acpid /var/run/acpid.socket
unix 2 [ ] DGRAM 53829917 14564/ntpd
unix 2 [ ] STREAM CONNECTED 53770274 2407/acpid /var/run/acpid.socket
unix 2 [ ] STREAM CONNECTED 51069411 2407/acpid /var/run/acpid.socket
unix 2 [ ] DGRAM 45666125 20161/snmpd
unix 2 [ ] DGRAM 45666022 2068/python
unix 2 [ ] STREAM CONNECTED 121969 2407/acpid /var/run/acpid.socket
unix 2 [ ] DGRAM 11988 3238/nm-system-sett
unix 3 [ ] STREAM CONNECTED 11983 2332/dbus-daemon /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 11982 3238/nm-system-sett
unix 2 [ ] STREAM CONNECTED 10518 2407/acpid /var/run/acpid.socket
unix 3 [ ] STREAM CONNECTED 9066 2332/dbus-daemon /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 9065 2626/hald
unix 3 [ ] STREAM CONNECTED 9025 2626/hald @/var/run/hald/dbus-xHPW6yhNNh
unix 3 [ ] STREAM CONNECTED 9024 2649/hda
unix 3 [ ] STREAM CONNECTED 8890 2626/hald @/var/run/hald/dbus-xHPW6yhNNh
unix 3 [ ] STREAM CONNECTED 8888 2640/event0
unix 3 [ ] STREAM CONNECTED 8875 2407/acpid /var/run/acpid.socket
unix 3 [ ] STREAM CONNECTED 8874 2636/acpid.socket
unix 3 [ ] STREAM CONNECTED 8865 2626/hald @/var/run/hald/dbus-xHPW6yhNNh
unix 3 [ ] STREAM CONNECTED 8864 2636/acpid.socket
unix 3 [ ] STREAM CONNECTED 8324 2626/hald @/var/run/hald/dbus-wAh6GovtcJ
unix 3 [ ] STREAM CONNECTED 8323 2627/hald-runner
unix 2 [ ] DGRAM 7955 2535/crond
unix 2 [ ] DGRAM 7916 2519/gpm
unix 2 [ ] DGRAM 7751 2461/xinetd
unix 2 [ ] DGRAM 7489 2382/automount
unix 3 [ ] STREAM CONNECTED 7379 2332/dbus-daemon
unix 3 [ ] STREAM CONNECTED 7378 2332/dbus-daemon
unix 3 [ ] STREAM CONNECTED 7097 1969/audispd /var/run/audispd_events
unix 3 [ ] STREAM CONNECTED 7096 2068/python
unix 3 [ ] STREAM CONNECTED 6915 2148/rpc.idmapd
unix 3 [ ] STREAM CONNECTED 6914 2148/rpc.idmapd
unix 2 [ ] DGRAM 6770 2098/rpc.statd
unix 2 [ ] DGRAM 6666 2068/python
unix 2 [ ] DGRAM 6515 2011/klogd
unix 3 [ ] STREAM CONNECTED 6408 1967/auditd
unix 3 [ ] STREAM CONNECTED 6407 1969/audispd
 
Old 04-06-2010, 11:34 AM   #4
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 163Reputation: 163
The problem is your application is only bonded to the local (127.0.0.1) interface. If you attempted to connect to it from localhost it would likely work. You need it to either bond to 0.0.0.0 (all interfaces) or alternately to 10.18.22.116
 
Old 04-07-2010, 07:05 AM   #5
tom_sawyer70
LQ Newbie
 
Registered: Jul 2009
Posts: 21

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by rweaver View Post
The problem is your application is only bonded to the local (127.0.0.1) interface. If you attempted to connect to it from localhost it would likely work. You need it to either bond to 0.0.0.0 (all interfaces) or alternately to 10.18.22.116
How do I change or update that bond (what is the file, or command to reference)? It's a bit foreign to me because I did not do anything different with the other ports that were configured (I believed) the same way.

Thank you,
Dave
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
If I forward a port in iptables, does the port have to be open on the firewall? qwertyjjj Linux - Server 4 08-06-2009 09:22 AM
How to open port 1951/tcp on a RHEL AS 4 machine? tieuphongvan Linux - Networking 4 05-06-2008 02:53 PM
best port scanner To scan open port in a network tanveer Linux - Security 8 01-21-2007 08:19 PM
How can I open port 113 on RHEL 4? dcushing Red Hat 5 09-15-2006 11:08 AM
cannot SFTP to SUSE 9.2 box, port 22 open, can putty in though using same port. jgrady Linux - Networking 6 03-29-2005 08:44 AM


All times are GMT -5. The time now is 02:50 AM.

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