LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-16-2012, 09:00 PM   #1
g_paschoal
Member
 
Registered: Oct 2009
Posts: 131

Rep: Reputation: 15
Ubuntu iptables on nagios port 5666


Guys... I am giving up... after trying to hard, search on internet, etc I decide to post here.

I have a nagios server and some clients...

Port 5666 are opened and I can connect to it on both server and client machines (telnet localhost 5666 got me connected)

The server does not have any iptables rules. The client does.

But no matter what rules I put there it does not work.

Form the server I cannot telnet on port 5666

telnet localhost 5666

root@xx:/usr/local/nagios/etc/GroupMaster-1# telnet xx.xx.xx.xx 5666
Trying xx.xx.xx.xx...

I have used this rules:

# /sbin/iptables -A INPUT -p tcp --dport 5666 -j ACCEPT
# /sbin/iptables -A OUTPUT -p tcp --dport 5666 -j ACCEPT

But it does not work.

both server and client are running ubntu.

Thanks
 
Old 01-16-2012, 09:41 PM   #2
fsainsbu
LQ Newbie
 
Registered: Aug 2010
Posts: 5

Rep: Reputation: 1
look at output of iptables-save, it may explain, perhaps dropping packet elsewhere
line in mine looks like
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 5666 -j ACCEPT
 
Old 01-17-2012, 12:54 AM   #3
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
What is the server/client software you're using? It may not be an iptables problem at all. Knowing what you're trying to do will help us accomplish what you want and even look at logs. There could be a configuration problem with the server software itself and not iptables at all. Without knowing your ultimate goal, you could potentially be asking the wrong questions and leading everyone into giving you the wrong answers. So what is your end game? What do you want to accomplish if we ignore the fact that you want iptables to "allow" port 5666?

What does
Code:
iptables -L
say on the server system?

Also, why are you running iptables on just the client and not the server? That's a pretty big security risk.

Last edited by sag47; 01-17-2012 at 12:58 AM.
 
Old 01-17-2012, 04:50 AM   #4
g_paschoal
Member
 
Registered: Oct 2009
Posts: 131

Original Poster
Rep: Reputation: 15
Because I didn't setup it yet on the server. I am finishing configurations first.

fsainsbu, thanks for the help man but your iptables rules have me an error.

I was able though to bypass this issue with the following

-A net2fw -p tcp -m tcp --dport 5666 -j ACCEPT


Thanks for the help guys!
 
Old 01-18-2012, 08:14 PM   #5
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
You still haven't given the output of this command...
Code:
iptables -L
It's best to know what you have before you start adding to it.
 
  


Reply



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
[SOLVED] ubuntu: iptables => "ip_conntrack_ftp" and changing default port (21) in proftpd dragonetti Linux - Newbie 2 11-10-2011 11:13 AM
[SOLVED] iptables: verify traffic on port to check if it is legitimate for that port. lievendp Linux - Security 5 04-18-2011 08:00 AM
CentOS 5: iptables - cannot open port 80 and nat to port 8080 for Tomcat steve willett Linux - Networking 4 09-24-2010 04:03 AM
Port Forwarding trouble with iptables on ubuntu gateway elgranjefe Linux - Networking 2 11-17-2008 07:44 PM
debian iptables squid - redirect port 80 to port 8080 on another machine nickleus Linux - Networking 1 08-17-2006 12:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration