IPv6 not being written in httpd.conf

ericovk

Verified User
Joined
Apr 17, 2012
Messages
228
Location
Rotterdam, Netherlands
I had a VPS with DA that I cloned. Changed ipv4. Everything went fine for month. Now I've added ipv6 and things get messed up.
When I open a hosted app from one of the users, I get the message:
"This IP is being shared among many domains.
To view the domain you are looking for, simply enter the domain name in the location bar of your web browser."

It appears that I had changed the network config file in centos (6.9) properly, but I still had the old ipv6 address registered in DA. I remove the old ipv6 and added the new one.

But after this action, my user's httpd.conf (/usr/local/directadmin/data/users/<user>/httpd.conf) still contain the old ipv6 address. The error is still there in the browser, because my browser is getting the hostname SSL for the user. That's no match.

I've checked all the steps of this help doc. and did a ./build rewrite_confs. Restarted network and httpd. Both without result.

I wasn't able to edit /usr/local/directadmin/data/users/<user>/httpd.conf directly. Can't restart httpd because of an error in the config file.

What to do next?
 
Yes, I've linked the (only) IPv6 address to the (only) IPv4 address, and made it global (though I have only one reseller).

Edit: when I add another test domain as a new account to DA, I get the same message:
This IP is being shared among many domains.
To view the domain you are looking for, simply enter the domain name in the location bar of your web browser.

When I view this httpd.conf hostfile, I see that the IP address is the correct one, but the IPv6 address is the old IPv6 address this VPS had. (I created this VPS by cloning it from another VPS and then edit the IP addresses.

It's the hosts file in:
/usr/local/directadmin/data/users/<accountname>/httpd.conf
 
Last edited:
linked the (only) IPv6 address
If you dont want IPv6 you will need to unlink them and remove it out of the IP areas in DA
Then run rewrite_confs again.
this may help you as well

This is for turning on ipv6 but its helpful to turn it off too.
 
Appreciate the help, but that isn't helping yet.

I've checked the /usr/local/directadmin/data/admin/ip.list file from your doc page. The right ip's are in there:
(obfuscated the ip's):
xxxx:7c8:xxxx:xxx:0:0:0:1
xxx.xxx.150.35

But the ip in my vhost file is still the old ip:
grep 443 /usr/local/directadmin/data/users/testaccount/httpd.conf
<VirtualHost xxx.xxx.150.35:443 [xxxx:348:xx:xxxx:0:0:0:1]:443 >

Only IPv6 is not matching. IPv4 is matching though.

It seems like:
1) DA has registered the olf IPv6 address somewere.
2) DA isn't rebuilding /usr/local/directadmin/data/users/testaccount/httpd.conf at all after IPv6 change (or removal and readding, or after running ./build reqrite_confs)
 
PS: for full context: these are the steps I've taken to the issue I am running at.

Issue: stuck with old IPv6 valiues in httpd.conf, so accounts aren't properly loaded over IPv6.

Steps:
1) Cloned another VPS to this VPS
2) Changed network settings in CentOS (I changed IPv4 and IPv6 with proper IP's)
3) Re-registered DA again with new IPv4.
4) Added/changed new IPv4 to IP management in DA.
5) Forgot to add/change IPv6.
6) Added more user accounts.
7) Launched an app.
8) Changed DNS of the domain.
9) Discovered that it's not working properly on IPv6.
10) Removed old IPv6 address
11) Added proper IPv6 address (that was also in the CentOS network config file)
12) ran ./build rewrite_confs, rebooted, emptied browser cache.
13) removed proper IPv6 and re-added it back again.
14) Added a new testaccount.
15) Still stuck with old IPv6 for old and newly added accounts.
 
Ok, I managed to get this working. But I think there's something wrong with my setup or the way DirectAdmin is handling IPv6 changes.

When I go to reseller level > all users > select the user > select the IPv6 address from the "Set to" dropdown and set it there. The IP is changing in the overview from the IPv4 address to the IPv6 address. Now the /usr/local/directadmin/data/users/testaccount/httpd.conf file contains the proper IPv4 address.

When I change it back to the IPv4 address the wrong/old IPv6 address is showing again. It seems like the old IPv6 is somehow, somewhere wrong connected to the IPv4 address.
 
No worries.
So you want to use IPV6 I couldn't quite tell.
In IP management. Is this all correct?
1607977013788.png

So when in Admin > IP manager to you see the correct ips in there?
1607976835091.png
15) Still stuck with old IPv6 for old and newly added accounts.

Did you go in the Show users > Accounts and remove the old bad ones and replace it with the new corrections?

1607977116587.png
 
Ok sorry I can't tell still
Do we want IPV6 on or off for this box?

If you want it off you need to totally remove everything for everywhere before you turn it off. just turning it off won't remove any old config.

If you want it on you need to remove every old entry from all the users and then the IP Manger/management areas. Then replace with all the correct configs

Did you ever restart directadmin as well?
 
As I mentioned in my first reply - I think you have the IP linked. Check:
Code:
cat /usr/local/directadmin/data/admin/ips/xxx.xxx.150.35

It has linked IPs line (urlencoded), urldecode it and you'll see what's there.
 
@bdacus01
Yes, I do need IPv6 enabled for this VPS.

@smtalk
I thought you meant IP manager from within DA (not the shell), sorry. The linked_ips is unreadable to me.

# cat /usr/local/directadmin/data/admin/ips/77.72.150.35
gateway=
linked_ips=******obfuscated****%34%38%3A%38a%3A%33%34%37%32%3A%30%3A%30%3A%30%3A%31=apache%3Dyes%26dns%3Dyes
netmask=255.255.255.0
ns=
reseller=
status=server
value=4

The weirdest thing is that the ip switch is working when I attach the IPv6 address, the IPv4 address is being linked the right way. But not the other way around. The IPv6 address isn't linked properly when I add the IPv4 address.
 
I figured out what went wrong: As an admin, I deleted the (only registered) IPv6 address in DA admin level > IP management. During the deletion of the IPv6 address, this old IPv6 address was not UNLINKED from the (only) IPv4 address. I didn't mention this until this morning. When I clicked DA admin level > IP management > the IPv4 address, DA kept loading and sort of crashed. I reloaded DA and added the old/wrong IPv6 address again to DA admin level > IP management again, clicked the IPv4 address and voila, both IPv6 addresses were there. Only the wrong IPv6 was linked. I unlinked and deleted the old IPv6 and linked the right IPv6 from the settings of the DA admin level > IP management > IPv4 address. (So not from the IPv6 address settings).

This seems an issue/lacking in the DA script for the deletion of the IPv6 address. This thread can be closed.

Thanks for your help smtalk and bdacus01!
 
Back
Top