Error "Server Not Found" - Virtualmin Fresh Install

6 posts / 0 new
Last post
#1 Tue, 08/16/2016 - 02:52
drivingmenuts
drivingmenuts's picture

Error "Server Not Found" - Virtualmin Fresh Install

Hi, I'm new with Virtualmin, I just installed the GPL version of Virtualmin on an Ubuntu16.04.01 LTS server.

I can access the panel without any problems and I can create a virtual server both from the Virtualmin Tab > Create Virtual Server and the Webmin Servers > Apache Webservers > Create Virtual Host tab. And I followed the instructions from Virtualmin's video tutorial on YouTube, and it seems everything was ok, but when I go to my domain (my site.com) I just get a "Server not found" error. But when I use the "preview website" option in virtualmin I can see the site. It's really weird.

Also, I did upload a fresh install of Wordpress in the /home/myfolder/public_html/ document root directory

I checked my DNS settings on IntoDNS.com and got the following Errors below:

Error Mismatched NS records WARNING: One or more of your nameservers did not return any of your NS records. Error DNS servers responded ERROR: One or more of your nameservers did not respond: The ones that did not respond are: my.ip.address

Multiple Nameservers ERROR: Looks like you have less than 2 nameservers. According to RFC2182 section 5 you must have at least 3 nameservers, and no more than 7. Having 2 nameservers is also ok by me. * ( I have two nameservers setup, so I don't understand that)

Missing nameservers reported by your nameservers You should already know that your NS records at your nameservers are missing, so here it is again:

ns2.mysite.com. ns1.mysite.com.

SOA Error SOA record No valid SOA record came back!

MX Error MX Records Oh well, I did not detect any MX records so you probably don't have any and if you know you should have then they may be missing at your nameservers!

WWW Error WWW A Record ERROR: I could not get any A records for www.mysite.com!

(I only do a cache request, if you recently added a WWW A record, it might not show up here.)

Any help?

Thanks

Tue, 08/16/2016 - 13:40
andreychek

Howdy,

It sounds like your issue is DNS related. It may be that BIND isn't listening for requests, or there may be a firewall blocking access to BIND.

What is the output of these commands:

netstat -an | grep :53
iptables -L -n
Tue, 08/16/2016 - 14:33 (Reply to #2)
drivingmenuts
drivingmenuts's picture

Hey thanks for the reply...

The first command returned this:

tcp 0 0 10.10.0.5:53 0.0.0.0:* LISTEN
tcp 0 0 162.243.164.137:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp6 0 0 :::53 :::* LISTEN
udp 0 0 10.10.0.5:53 0.0.0.0:*
udp 0 0 162.243.164.137:53 0.0.0.0:*
udp 0 0 127.0.0.1:53 0.0.0.0:*
udp6 0 0 :::53 :::*

the second this:

Chain INPUT (policy DROP) target prot opt source destination
ufw-before-logging-input all -- 0.0.0.0/0 0.0.0.0/0
ufw-before-input all -- 0.0.0.0/0 0.0.0.0/0
ufw-after-input all -- 0.0.0.0/0 0.0.0.0/0
ufw-after-logging-input all -- 0.0.0.0/0 0.0.0.0/0
ufw-reject-input all -- 0.0.0.0/0 0.0.0.0/0
ufw-track-input all -- 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy DROP) target prot opt source destination
ufw-before-logging-forward all -- 0.0.0.0/0 0.0.0.0/0
ufw-before-forward all -- 0.0.0.0/0 0.0.0.0/0
ufw-after-forward all -- 0.0.0.0/0 0.0.0.0/0
ufw-after-logging-forward all -- 0.0.0.0/0 0.0.0.0/0
ufw-reject-forward all -- 0.0.0.0/0 0.0.0.0/0
ufw-track-forward all -- 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT) target prot opt source destination
ufw-before-logging-output all -- 0.0.0.0/0 0.0.0.0/0
ufw-before-output all -- 0.0.0.0/0 0.0.0.0/0
ufw-after-output all -- 0.0.0.0/0 0.0.0.0/0
ufw-after-logging-output all -- 0.0.0.0/0 0.0.0.0/0
ufw-reject-output all -- 0.0.0.0/0 0.0.0.0/0
ufw-track-output all -- 0.0.0.0/0 0.0.0.0/0

Chain ufw-after-forward (1 references) target prot opt source destination

Chain ufw-after-input (1 references) target prot opt source destination
ufw-skip-to-policy-input udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:137 ufw-skip-to-policy-input udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:138 ufw-skip-to-policy-input tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:139 ufw-skip-to-policy-input tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:445 ufw-skip-to-policy-input udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:67 ufw-skip-to-policy-input udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:68 ufw-skip-to-policy-input all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type BROADCAST

Chain ufw-after-logging-forward (1 references) target prot opt source destination
LOG all -- 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "

Chain ufw-after-logging-input (1 references) target prot opt source destination
LOG all -- 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "

Chain ufw-after-logging-output (1 references) target prot opt source destination

Chain ufw-after-output (1 references) target prot opt source destination

Chain ufw-before-forward (1 references) target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 3 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 4 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 11 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 12 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 8 ufw-user-forward all -- 0.0.0.0/0 0.0.0.0/0

Chain ufw-before-input (1 references) target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED ufw-logging-deny all -- 0.0.0.0/0 0.0.0.0/0 ctstate INVALID DROP all -- 0.0.0.0/0 0.0.0.0/0 ctstate INVALID ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 3 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 4 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 11 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 12 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 8 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp spt:67 dpt:68 ufw-not-local all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT udp -- 0.0.0.0/0 224.0.0.251 udp dpt:5353 ACCEPT udp -- 0.0.0.0/0 239.255.255.250 udp dpt:1900 ufw-user-input all -- 0.0.0.0/0 0.0.0.0/0

Chain ufw-before-logging-forward (1 references) target prot opt source destination

Chain ufw-before-logging-input (1 references) target prot opt source destination

Chain ufw-before-logging-output (1 references) target prot opt source destination

Chain ufw-before-output (1 references) target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED ufw-user-output all -- 0.0.0.0/0 0.0.0.0/0

Chain ufw-logging-allow (0 references) target prot opt source destination
LOG all -- 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW ALLOW] "

Chain ufw-logging-deny (2 references) target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0 ctstate INVALID limit: avg 3/min burst 10 LOG all -- 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 10 LOG flags 0 level 4 prefix "[UFW BLOCK] "

Chain ufw-not-local (1 references) target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL RETURN all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type MULTICAST RETURN all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type BROADCAST ufw-logging-deny all -- 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 10 DROP all -- 0.0.0.0/0 0.0.0.0/0

Chain ufw-reject-forward (1 references) target prot opt source destination

Chain ufw-reject-input (1 references) target prot opt source destination

Chain ufw-reject-output (1 references) target prot opt source destination

Chain ufw-skip-to-policy-forward (0 references) target prot opt source destination
DROP all -- 0.0.0.0/0 0.0.0.0/0

Chain ufw-skip-to-policy-input (7 references) target prot opt source destination
DROP all -- 0.0.0.0/0 0.0.0.0/0

Chain ufw-skip-to-policy-output (0 references) target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

Chain ufw-track-forward (1 references) target prot opt source destination

Chain ufw-track-input (1 references) target prot opt source destination

Chain ufw-track-output (1 references) target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 ctstate NEW ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 ctstate NEW

Chain ufw-user-forward (1 references) target prot opt source destination

Chain ufw-user-input (1 references) target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:22 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:25 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 80,443 /* 'dapp_Apache%20Full' */ ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:10000 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:10000

Chain ufw-user-limit (0 references) target prot opt source destination
LOG all -- 0.0.0.0/0 0.0.0.0/0 limit: avg 3/min burst 5 LOG flags 0 level 4 prefix "[UFW LIMIT BLOCK] " REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable

Chain ufw-user-limit-accept (0 references) target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0

Chain ufw-user-logging-forward (0 references) target prot opt source destination

Chain ufw-user-logging-input (0 references) target prot opt source destination

Chain ufw-user-logging-output (0 references) target prot opt source destination

Chain ufw-user-output (1 references) target prot opt source destination

Thanks again.

Tue, 08/16/2016 - 15:20
andreychek

Howdy,

It looks like BIND is up and running, and listening on all interfaces.

What stands out to me, is that there's a firewall there with quite a few rules in it.

It's hard to follow exactly, but I have a hunch that the firewall may be the culprit in preventing access to BIND/DNS.

It looks like you have UFW installed there for handling firewall duties -- could you temporarily disable UFW, and any remaining firewall rules, then try again?

If it works at that point, then it just means you need to tweak your firewall settings.

-Eric

Tue, 08/16/2016 - 17:02 (Reply to #4)
drivingmenuts
drivingmenuts's picture

Okay I disabled the firewall and it's now pulling up the domain but now the usual wordpress install page isn't showing, it's just showing this:

<?php /** * Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */

/** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */ require( dirname( FILE ) . '/wp-blog-header.php' );

Also I need a firewall, so is there any particular ports that I need to keep open. This is what I had open before disabling it.

Status: active Logging: on (low) Default: deny (incoming), allow (outgoing), disabled (routed) New profiles: skip

To Action From -- ------ ---- 22 ALLOW IN Anywhere
80/tcp ALLOW IN Anywhere
443/tcp ALLOW IN Anywhere
25/tcp ALLOW IN Anywhere
80,443/tcp (Apache Full) ALLOW IN Anywhere
10000 ALLOW IN Anywhere
22 (v6) ALLOW IN Anywhere (v6)
80/tcp (v6) ALLOW IN Anywhere (v6)
443/tcp (v6) ALLOW IN Anywhere (v6)
25/tcp (v6) ALLOW IN Anywhere (v6)
80,443/tcp (Apache Full (v6)) ALLOW IN Anywhere (v6)
10000 (v6) ALLOW IN Anywhere (v6)

Also not sure if this means anything but before i disabled it, I did this command listed below, from a search on youtube and it showed this:

sudo grep -i ' virtualhost' /etc/apache2/sites-enabled/*.conf VirtualHost *:80

Then when I disabled it, it showed this:

sudo grep -i ' virtualhost' /etc/apache2/sites-enabled/*.conf VirtualHost 162.243.164.137:80

Also did command

netstat -ln |grep 10000

tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN
udp 0 0 0.0.0.0:10000 0.0.0.0:*

And before disable, when I did an NS Lookup command, it showed this

sudo nslookup www.mysite.com

;; Got SERVFAIL reply from 2001:4860:4860::8844, trying next server ;; Got SERVFAIL reply from 2001:4860:4860::8888, trying next server Server: 8.8.8.8 Address: 8.8.8.8#53

** server can't find www.mysite.com: SERVFAIL

Then after disabling the firewall it showed results but I don't know what server and address this is.

sudo nslookup www.mysite.com Server: 2001:4860:4860::8844 Address: 2001:4860:4860::8844#53

Non-authoritative answer: Name: www.mysite.com Address: 162.243.164.137

Thanks

Tue, 08/16/2016 - 22:59
andreychek

It's simplest to tackle one issue at a time, so let's go over the Wordpress issue you described there --

It looks like it's just displaying the PHP code, rather than executing it, is that correct?

What's the output of this command:

dpkg -l 'php*'

Also, if you go into System Settings -> Re-Check Config, does it detect any problems?

-Eric

Topic locked