I run a hand full of websites via Virtualmin Pro on a Cloud-service instance with a static external IP (220.127.116.11). I would like to follow the recommendations and supply the static IP.
By doing this I hope to fix these issues:
If I go to the Virtualmin control panel > Select example.com > Logs and reports > Check Connectivity:
DNS resolution mismatch
example.com resolved to 18.104.22.168 instead of the expected 10.1.1.131
Check with your DNS registrar that the nameservers for the domain are set correctly, and that the IP address in your DNS records is correct.
SMTP connection failed
Network is unreachable
Make sure your system’s mail server is running and listening on the external network interface.
Apache server is complaining about missing VirtualHosts:
ubuntu@ns1:~$ sudo service apache2 restart * Restarting web server apache2 [Mon Jun 23 21:21:19 2014] [warn] NameVirtualHost 22.214.171.124:80 has no VirtualHosts [Mon Jun 23 21:21:19 2014] [warn] NameVirtualHost 126.96.36.199:443 has no VirtualHosts
(The SMTP error puzzles me since mails are coming through all right. But I figure it could relate to the DNS resolution mismatch)
Here’s some info on the network model. At the moment Virtualmin only picks up the internal IP address (10.1.1.131) and registers it as given by DHCP.
The hosting provider is running dynamic NAT meaning that all outgoing traffic from the instances goes through the virtual router with internal IP address 10.1.1.1, external IP 188.8.131.52
Heres some information from the terminal:
ubuntu@ns1:~$ curl ifconfig.me 184.108.40.206
ubuntu@ns1:~$ netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.1.1.1 0.0.0.0 UG 0 0 0 eth0
10.1.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
eth0 Link encap:Ethernet HWaddr 02:00:6c:0d:00:05
inet addr:10.1.1.131 Bcast:10.1.1.255 Mask:255.255.255.0
inet6 addr: fe80::6cff:fe0d:5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:815428 errors:0 dropped:0 overruns:0 frame:0
TX packets:632875 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:548156404 (548.1 MB) TX bytes:777898188 (777.8 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:41958 errors:0 dropped:0 overruns:0 frame:0
TX packets:41958 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:13824582 (13.8 MB) TX bytes:13824582 (13.8 MB)
I am not using the BIND DNS module, using external. FQDN setup ok.
My guess is that I should go to Webmin > Networking > Network configuration > Network Interface > eth0
Here I would
- Choose Static Configuration
- Supply the static IP 220.127.116.11 in IPv4 address
- Supply the netmask 255.255.255.0
- Leave broadcast to automatic
Then I would go and change all the IPs of my virtual servers to 18.104.22.168. And I guess the “Address type to change” would be the “Real address”.
Not too sure of all this though, so before I go lock myself out of the system, I thought I’d better ask for some advice here. Any tips on setting the static IP up correctly and getting rid of the DNS resolution issue?