NPFchan
NPFchan copied to clipboard
DNS Blacklist issue
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 ?!
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.
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.
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.
Potentially, this may also be resolvable via nsswitch.conf.