NPFchan icon indicating copy to clipboard operation
NPFchan copied to clipboard

DNS Blacklist issue

Open CartoonEye opened this issue 5 years ago • 5 comments

Whenever I try to post on my own board (as the admin) I get the following error torexit.dan.me.uk What do I do ?!

CartoonEye avatar Apr 16 '19 08:04 CartoonEye

Delete or comment out line 367 in config.php to fix it. Line: $config['dnsbl'][] = 'torexit.dan.me.uk';

Note that this will allow all Tor users to post.

hvc4 avatar Jul 14 '19 20:07 hvc4

The gethostbyname($host) PHP function returns the IP address for a given hostname. If the DNS server returns a "No Such Name", the kernel/os? will append the domain of your local system to the query and try again.

123.123.123.123.torexit.dan.me.uk returns "No Such Name" For your server ("leethackerchan.com") it will then try: 123.123.123.123.torexit.dan.me.uk.com which happens to be configured to ALWAYS return an IPv4 for any subdomain.

If you follow the logic here https://github.com/fallenPineapple/NPFchan/blob/master/inc/functions.php#L3344 and then here https://github.com/fallenPineapple/NPFchan/blob/master/inc/functions.php#L2437 you can see how this results in all posters being rejected as blacklisted.

The stop-gap solution is to edit /etc/hostname and remove .com from your FQDN.

dbrownidau avatar Sep 05 '19 16:09 dbrownidau

image

dbrownidau avatar Sep 05 '19 16:09 dbrownidau

Also if anyone wants to dev a solution, appending . to the end of the FQDN passed to gethostbyname($host) will stop the OS from appending the local domain.

dbrownidau avatar Sep 05 '19 16:09 dbrownidau

Potentially, this may also be resolvable via nsswitch.conf.

dbrownidau avatar Feb 12 '20 11:02 dbrownidau