| Linode Forum https://forum.linode.com/ |
|
| iptables Blocking DNS https://forum.linode.com/viewtopic.php?f=19&t=9728 |
Page 1 of 1 |
| Author: | pmp6nl [ Mon Jan 21, 2013 12:33 am ] |
| Post subject: | iptables Blocking DNS |
Hello, I noted in my log that iptables is blocking DNS, including from resolver2.dallas.linode.com. This seems odd to me, but I must have gotten it from tutorial on here. The server has been running for 8 months with no noticable issues. Does anyone else have their iptables setup like this? What are the pros and cons of this setup? Thank you so much. Code: kernel: iptables denied: IN=eth0 OUT= MAC=f2:3c:91:ae:bd:2b:c8:4c:75:f5:c4:ff:08:00 SRC=72.14.188.5 DST=96.126.122.2xx LEN=72 TOS=0x00 PREC=0x00 TTL=63 ID=7355 PROTO=UDP SPT=53 DPT=57572 LEN=52 |
|
| Author: | sednet [ Mon Jan 21, 2013 3:54 pm ] |
| Post subject: | Re: iptables Blocking DNS |
So this is a reply from resolver2.dallas.linode.com for your DNS query? Does DNS actually work on your linode? Assuming you have a rule something like: iptables -A OUTPUT -s 96.126.122.2xx/32 -p udp -m udp --dport 53 -m state --state NEW -j ACCEPT The reply should have been accepted by a rule like: iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT But it wasn't. Show us your iptables rules. |
|
| Author: | pmp6nl [ Tue Jan 22, 2013 10:47 pm ] |
| Post subject: | Re: iptables Blocking DNS |
Hello, Thanks for the info and for looking. DNS seems to be working, I am running some sites without problems. My iptables are below. Thanks! Code: Chain INPUT (policy ACCEPT) |
|
| Author: | sednet [ Thu Jan 24, 2013 5:09 pm ] |
| Post subject: | Re: iptables Blocking DNS |
iptables without -v doesn't even tell you what interfaces the rules apply to. Try 'iptables -L -n -v'. |
|
| Author: | pmp6nl [ Sun Jan 27, 2013 10:48 pm ] |
| Post subject: | Re: iptables Blocking DNS |
Oh ok, here ya go: Code: Chain INPUT (policy ACCEPT 0 packets, 0 bytes) Thanks. |
|
| Author: | sednet [ Wed Jan 30, 2013 6:15 am ] |
| Post subject: | Re: iptables Blocking DNS |
Don't you need to explicitly establish state on the outbound connections before you can catch the return traffic with state ESTABLISHED? I'd use the following as the OUTPUT rule: iptables -A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT But this accepts all outgoing traffic which is bad practice on a secure system. The right ( i.e. paranoid ) way to do it is to block everything then explicitly allow legitimate traffic as specifically as possible. I don't think you should be blocking incoming ICMP the way you are. There are other useful things that are sent with ICMP other than ping. Personally I would not use fail2ban as I don't think that it adds security to SSH and won't help much if you do something really dumb like use dictionary word passwords in any case. This has been discussed before on here and others disagree with me. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|