Results 1 to 6 of 6
I'm having a lot of problems getting NIS set up with our firewall. I've looked online and no one seems to have any answers. When the firewall is off, NIS ...
- 03-08-2010 #1Just Joined!
- Join Date
- Feb 2007
- Location
- Winnipeg, MB
- Posts
- 14
Logging Connection Attempts with iptables
I'm having a lot of problems getting NIS set up with our firewall. I've looked online and no one seems to have any answers. When the firewall is off, NIS works. When it's on, it doesn't.
I would like to know which ports NIS needs by logging connection attempts on the server, since I would swear the right ports seem open already. Right now I'm using this to generate the log entries:
iptables -I INPUT -m state --state NEW -j LOG --log-prefix "New Connection: "
iptables -I OUTPUT -m state --state NEW -j LOG --log-prefix "New Connection: "
However, I think it must only work for successful connections, because I'm not seeing any new entries when I try running the NIS client on another machine (ypbind).
Any help is greatly appreciated!
- 03-09-2010 #2Just Joined!
- Join Date
- Feb 2007
- Location
- Winnipeg, MB
- Posts
- 14
Anyone? I'd be happy with logging connection attempts with any other program as well, there must be a way...
- 03-09-2010 #3
Try logging syn packets instead.
- 03-09-2010 #4Just Joined!
- Join Date
- Feb 2007
- Location
- Winnipeg, MB
- Posts
- 14
I don't know how to do that in iptables.
However, it looks like I can get the information I need with the tcpdump program.
- 03-10-2010 #5Banned
- Join Date
- Dec 2002
- Location
- Texas
- Posts
- 242
# log telnet attempts
#-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 23 -j LOG --log-level 7
I have used the above to successfully log telnet attempts.
- 03-10-2010 #6
That or wireshark would do. As to the iptables rule
If affter you have the port and it is still not working post your rules so we can see if there is an issue there.Code:iptables -p tcp --tcp-flags SYN -j LOG --log-prefix "New Connection: "
And this will work when you know the port, but the OP was not sure if the port was the correct one that he had opened.
He is looking for the port that his system is using to connect.


Reply With Quote
