IP Tables Saga...:(
IP Tables Saga...:(
Hi Guys,
I have a bizarre one here, setting up an XI server at a customer site for monitoring their stuff, I was happily all the network switches until we needed to cross subnet boundaries and add switches from a different subnet , it looks like iptables is somehow managing to block snmp queries from other subnets, just confirm I can ssh and ping to the remote hosts only SNNP problems...
here is my rule chain output
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 tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
ACCEPT udp -- anywhere anywhere state NEW udp dpt:snmp
ACCEPT udp -- anywhere anywhere state NEW udp dpt:snmptrap
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Any suggestions how I can fix this without permanently shutting down iptables ...
Many Thanks
Arnab
I have a bizarre one here, setting up an XI server at a customer site for monitoring their stuff, I was happily all the network switches until we needed to cross subnet boundaries and add switches from a different subnet , it looks like iptables is somehow managing to block snmp queries from other subnets, just confirm I can ssh and ping to the remote hosts only SNNP problems...
here is my rule chain output
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 tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
ACCEPT udp -- anywhere anywhere state NEW udp dpt:snmp
ACCEPT udp -- anywhere anywhere state NEW udp dpt:snmptrap
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Any suggestions how I can fix this without permanently shutting down iptables ...
Many Thanks
Arnab
Re: IP Tables Saga...:(
Have you confirmed that it's working when iptables is stopped?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: IP Tables Saga...:(
Yes snmpwalk works a treat as soon as I hit service iptables stop !!!
Re: IP Tables Saga...:(
This is not resolved by the way dont know why the tick was put next to the post...:p
Re: IP Tables Saga...:(
Add a log line before the reject in your input chain. That should provide you some logging to identify what, exactly, is being blocked.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: IP Tables Saga...:(
I don't have these 2 lines in my iptables and can make the requests just fine
this should fall under
As the Nagios server is initiating the connection, and the connection isn't going into the XI server on the snmp port, it is connecting to the external server on that port..
Code: Select all
ACCEPT udp -- anywhere anywhere state NEW udp dpt:snmp
ACCEPT udp -- anywhere anywhere state NEW udp dpt:snmptrap
Code: Select all
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
Re: IP Tables Saga...:(
this is only happenning if the remote host is on another l3 subnet devices on the same subnet works just fine....
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: IP Tables Saga...:(
I would think this was related to an external router blocking the UDP traffic if you hadn't said it works fine with IP tables turned off...
Are you running the same test with iptables on and off?
Also, I'm going to ask a question that may be totally unrelated, but is selinux enabled on the system?
I only ask because it seems to creep in and break things all the time...
Are you running the same test with iptables on and off?
Also, I'm going to ask a question that may be totally unrelated, but is selinux enabled on the system?
I only ask because it seems to creep in and break things all the time...
Re: IP Tables Saga...:(
hi scott,
yes i also thought this was related to an external router etc ..however after troubleshooting the whole network across 10ss of routers ..it turned out to be iptables...selinux as far as i know should be off doesnt the xi install script get rid of it i will double check, can you tell me how i can see what packets are being dropped by iptables ?
cheers
arnab
yes i also thought this was related to an external router etc ..however after troubleshooting the whole network across 10ss of routers ..it turned out to be iptables...selinux as far as i know should be off doesnt the xi install script get rid of it i will double check, can you tell me how i can see what packets are being dropped by iptables ?
cheers
arnab
Re: IP Tables Saga...:(
Before the DROP rule, add a rule to log :arnab.roy wrote:hi scott,
yes i also thought this was related to an external router etc ..however after troubleshooting the whole network across 10ss of routers ..it turned out to be iptables...selinux as far as i know should be off doesnt the xi install script get rid of it i will double check, can you tell me how i can see what packets are being dropped by iptables ?
cheers
arnab
-A INPUT -j LOG --log-prefix 'Firewall: '
Then all dropped packets will appear in /var/log/messages