[Solved] How to change "Default shared address"?

11 posts / 0 new
Last post
#1 Sun, 08/18/2013 - 09:48
Karl

[Solved] How to change "Default shared address"?

Could tell me someone what is controlling "Default shared address" under Virtualmin and how can I change this?

This is the reason for my question:

I recently installed a fresh Virtualmin on a Virtual Server under Debian 7. I added a 2nd IP address to this server which I added then to the list "Shared addresses for any servers" under "System Settings" --> "Addresses and Networking" --> "Shared IP Addresses". Anything worked fine.

Today I added a 3rd IP address as above. But then after a reboot of the server Virtualmin suddenly changed the "Default shared address" to the newly added 3rd IP address and the original main IP address was completely removed in the setup.

Can someone tell me what happened here and how can I change "Default shared address" back to its original value (the main IP address)?

Thank you.

Sun, 08/18/2013 - 13:16
andreychek

Howdy,

Hmm, just adding a new interface, and adding a new shared IP to the Shared IP Addresses screen, shouldn't change the default IP... if you run the command "/sbin/ifconfig", what is the name of the network interface associated with the new IP address?

For example, is it something like "eth0:2"?

You may also want to take a peek at System Settings -> Virtualmin Config -> Network Settings, to make sure you don't see anything out of the ordinary there.

-Eric

Thu, 06/20/2019 - 05:51 (Reply to #2)
Martinsjnr

Hi, but what exactly should it look like?

Mon, 08/19/2013 - 04:21
Karl

Hi Eric,

this is what I get from /sbin/ifconfig:

venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00                                               -00
          inet addr:178.xxx.41.238  P-t-P:178.xxx.41.238  Bcast:178.xxx.41.238                                                 Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

venet0:1  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00                                               -00
          inet addr:178.xxx.39.111  P-t-P:178.xxx.39.111  Bcast:178.xxx.39.111                                                 Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

venet0:2  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00                                               -00
          inet addr:178.xxx.37.235  P-t-P:178.xxx.37.235  Bcast:178.xxx.37.235                                                 Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
  • The IP address under "venet0:0" is the 2nd IP address.
  • The IP address under "venet0:1" is the 1st original main IP address – which should stay as the Default shared address.
  • The IP address under "venet0:2" is the 3rd IP address.

I've no control over the above order since it's a virtual server. But how can I change the "Default shared address" setting under Virtualmin?

Under System Settings -> Virtualmin Config -> Network Settings I don't see anything out of the ordinary:

Name    Type    IPv4 address    Netmask    IPv6 address    Activate  

lo Loopback 127.0.0.1 255.0.0.0
Yes
venet0 OpenVZ 127.0.0.1 255.255.255.255 ::2 Yes
  venet0:0 OpenVZ (Virtualmin) 178.xxx.41.238 255.255.255.255
Yes
  venet0:1 OpenVZ (Virtualmin) 178.xxx.39.111 255.255.255.255
Yes
  venet0:2 OpenVZ (Virtual) 178.xxx.37.235 255.255.255.255
Yes

Thank you, Karl

Mon, 08/19/2013 - 09:17
andreychek

Howdy,

In System Settings -> Virtualmin Config -> Network Settings, what is "Network interface for virtual addresses" and "Default virtual server IP address" set to?

-Eric

Mon, 08/19/2013 - 10:23
Karl

"Network interface for virtual addresses" = "venet0:0"

"Default virtual server IP address" = "From network interface"

Thanks for your hint. I did many Virtualmin installations in the past but never changed anything here – I didn't even know the existence of this setup. ;)

But I have no clue what this means: Network interface for virtual addresses

If your server has multiple interfaces, you may choose which interface to use for your virtual domains. If SSL or FTP virtual hosts are enabled, a new IP will be required for each domain on which the feature is enabled. Unless configured otherwise during domain creation, the new addresses will be created on the interface specified here.

What is a "virtual domain"? And I don't create domains via Virtualmin.

Mon, 08/19/2013 - 11:08
andreychek

Howdy,

Hmm, what is the process you use for adding a domain?

A virtual domain is referring to a domain in Apache that doesn't have a dedicated IP -- one using a shared IP.

According to the settings on the Network Settings screen, it sounds like the IP address of "venet0:0" should be the default addressed used for shared IP addresses.

Just to verify though -- you're saying that if you go into Addresses and Networking -> Shared IP Addresses, that at the top where it mentions "Default shared address", the IP listed there is not the IP associated with venet0:0, 178.xxx.41.238?

-Eric

Mon, 08/19/2013 - 15:39
Karl

Hi Eric,

I think for me here's a lot of confusion about the words "domain", "server", and "website". For me a "domain" (domain name) is something like "virtualmin.com", which I of course get from my domain registrar. And a "server" for me is a piece of hardware I usually get from my hoster, or at least a "virtual server".

I remember as I started using Virtualmin I had a hard time to understand that to create a new website/webspace on my server (my hardware) I had to create a "server" on my server. ;)

Now I understand that when you are talking about "(virtual) domain" you are talking about "website/webspace" or "server" within Virtualmin. Quite confusing but I think I got it now. ;)

Now I think that my original question "How to change "Default shared address"?" is answered here. It's in "System Settings" --> "Virtualmin Config" --> "Network Settings" --> either "Network interface for virtual addresses" or "Default virtual server IP address". I'm sorry that I didn't find it by myself. :)

What I don't understand yet is the difference between "Network interface for virtual addresses" an "Default virtual server IP address".

Thanks and best regards,

Karl

Mon, 08/19/2013 - 16:35
andreychek

Yeah, it's confusing in part because the term "virtual" was in use before VPS's existed :-)

Apache has been using the term "VirtualHost" for domain's hosted within it for awhile now, and "Virtual Hosting" is the term used for hosting multiple domains on a given IP address.

That's what Virtualmin is referring to by a "virtual domain".

And then Virtualmin began using "Virtual Server" to describe all the components of hosting a domain on a server -- and that's certainly even more confusing today :-)

Regarding the two options you're looking at in the Network Settings Screen -- I'd suggest setting "Network interface for virtual addresses" to the Network Interface you want to use as your default IP address, and then set "Default virtual server IP address" to "From network interface".

-Eric

Mon, 08/19/2013 - 17:18
Karl

Regarding the two options you're looking at in the Network Settings Screen -- I'd suggest setting "Network interface for virtual addresses" to the Network Interface you want to use as your default IP address, and then set "Default virtual server IP address" to "From network interface".

Yes, I did that. But after running "Re-Check Configuration" I'm getting this message:

Default IP address is set to 178.xxx.39.111, but the detected external address is actually 178.xxx.41.238. This is typically the result of being behind a NAT firewall, and should be corrected on the module configuration page.

Can I simply ignore this?

Karl

Tue, 09/10/2013 - 10:03 (Reply to #10)
Karl

Is there someone who could help me this question? I'm always getting this warning message after running "Re-Check Configuration". What does it mean? What is meant by "detected external address"?

Default IP address is set to 178.xxx.39.111, but the detected external address is actually 178.xxx.41.238. This is typically the result of being behind a NAT firewall, and should be corrected on the module configuration page.

The first IP address "178.xxx.39.111" is the primary IP address of this server and the 2nd address ("detected external address") "178.xxx.41.238" is simply one of the additional IP addresses of this server.

Thank you,

Karl

Topic locked