Skip to main content

CSF Blocking Google DNS + dig Command

Comments

7 comments

  • cPanelLauren
    That rule basically means that related and established connections are accepted in the input chain associated with connection tracking /sbin/iptables -I (insert) INPUT -m (matches) conntrack --ctstate (connection state) RELATED,ESTABLISHED -j (target which means what to do) ACCEPT
    I'm not really sure how this has anything to do with Google's DNS resolvers though since it would primarily be related only to established sessions.
    Port 53 is open on TCP and UDP - both incoming and outgoing - both IP4 and IP6.

    How are you verifying this? What do you have in /etc/resolv.conf? You can find out by running the following: cat /etc/resolv.conf
    0
  • Hays Sleiman
    Thanks for the quick reply! This is what the cat command comes back with: # Generated by NetworkManager nameserver 127.0.0.1 nameserver 8.8.8.8 nameserver 8.8.4.4
    In the past, I've removed the "nameserver 127.0.0.1" line, but it just keeps being added automatically. In regards to port 53, I've got it set in CSF as unblocked on both incoming and outgoing configurations. Also, I sync the server as part of DNS cluster and I don't have any other DNS issues or problems with the dig command using anyone else other than Google. I.e. no issues with openDNS, or ISP DNS servers. So all of that, I assume port 53 is working correctly? Please let me know if I could be wrong. In the meantime, I'll add iptables rule I mentioned, but I'd rather get to the bottom of the problem.
    0
  • Hays Sleiman
    Nevermind. That rule isn't making a difference now :( So the only way so far has been to just disable csf (csf -x) completely to be able to use Google DNS to dig and solve the email issues. It's driving me crazy!
    0
  • Hays Sleiman
    I found the issue! Just in case anyone has a similar problem. So it turned out even though Google IPs were allowed through CSF and DNS ports were opened and vaified, Google DNS was being blocked. I know it wasn't a DNS issue specific to my server because every other DNS server was working. The dig and nslookup commands worked with my ISP servers, openDNS, and so on...just not with Google 8.8.8.8 and 8.8.4.4. I knew this meant the block was specific to Google but I couldn't find any Google IPs being blocked in the csf.deny file or anything like that. The other odd thing was the dig and nslookup commands only failed within Australia. When I RDPd in to an overseas computer and ran the commands using Google DNS, it worked fine. This is what lead us to the resolution. FINALLY, As per the suggestion from the awesome support team at cPanel, when I emptied my CC_DENY configuration in CSF and Voila! Everything works and Google can find me again! Due to the large number of spam and brute force attempts from certain countries, I had the following list in my CC_DENY input: CN,RU,IN,TW,PK,LA,PE So it turns out Google routes its Australian DNS servers through one of the above countries....I'll let you know which one soon...
    0
  • Hays Sleiman
    Pakistan...It was Pakistan. I've removed PK from the countries that csf blocks and Google DNS Australia can now see me :)
    0
  • Hays Sleiman
    It was also Taiwan...Had to remove TW as well. All good now.
    0
  • cPanelLauren
    Hi @Hays Sleiman This is what I was getting at, just because you've unblocked it doesn't mean it's open if you're blocking something related. I'm really glad you figured it out - google most likely routes through a lot of countries which may be something to keep in mind you may not be able to country block and use google DNS at some point. None the less, thank you so much for following up here with the resolution! Thanks!
    0

Please sign in to leave a comment.