Add a shared ipv6 address to all domains and users in the system

Zagorax

Verified User
Joined
Jan 11, 2011
Messages
67
Hi,

I would love all websites on my server to be ipv6 ready. I've enabled ipv6 in directadmin.conf, I've added the ipv6 on Admin Level->Ip Management and I've assigned it to the admin user (not yet found a way to mark it as 'server', as the main ipv4 is).

Then, from the reseller level, I've set it to shared. Then I've manually added it as additional ip to all users under the admin one.

Unfortunately, I was not able to assign it to domains from the user level. I've read the help about multi-ip system, but I cannot see the entry "add another ip to this domain". I'm using DirectAdmin 1.43.

Moreover, even being able to do so, it will work only for users created from user admin, and not, for example, for resellers and their users. Is there any way to set a system wide ipv6 as it happen to be the main ipv4 system?

Thank you for your help.
 
I've done that and I've supplied a rewrite of httpd and named. But still don't see any reference to ipv6 in dns zones or virtul host configuration. :(
 
Ehm... actually yes. After you pointing it out, I merged my custom template with the new one. Issued a rewrite for httpd but still nothing has changed.

By now, I've only two custom template.

dns_txt.conf:
Code:
|DOMAIN|.="v=spf1 a mx ip4:|SERVER_IP| ip6:2a02:29e0:2:4::b5b6:f0bd ~all"

And virtual_host2.conf:
Code:
|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html|
|?REALDOCROOT=`HOME`/domains/`DOMAIN`/public_html|
|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/usr/local/lib/php/|
|?ALLOW_OVERRIDE=AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,Includes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None|
|?SHARED_PHP=`HOME`/shared/php-dun|
<VirtualHost |IP|:|PORT_80| |MULTI_IP|>
|CUSTOM|
|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/cgi-bin/|
|*if USER="brandun"|
###################
# Alias per brandun
        Alias /css-dun /home/|USER|/shared/css-dun
        Alias /js-dun /home/|USER|/shared/js-dun
        Alias /php-dun /home/|USER|/shared/php-dun
        Alias /img-dun /home/|USER|/shared/img-dun
        Alias /error /home/|USER|/error
        Alias /font-dun /home/|USER|/font-dun
###################
|*endif|

	ServerName www.|DOMAIN|
	ServerAlias www.|DOMAIN| |DOMAIN| |SERVER_ALIASES|
	ServerAdmin |ADMIN|
	DocumentRoot |DOCROOT|
	|CGI|

	|USECANONICALNAME|

	<IfModule !mod_ruid2.c>
		SuexecUserGroup |USER| |GROUP|
	</IfModule>
	|*if HAVE_RUID2="1"|
	<IfModule mod_ruid2.c>
		RMode config
		RUidGid |USER| |GROUP|
		RGroups apache |SECURE_ACCESS_GROUP|
	</IfModule>
	|*endif|
	CustomLog /var/log/httpd/domains/|DOMAIN|.bytes bytes
	CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
	ErrorLog /var/log/httpd/domains/|DOMAIN|.error.log

	|*if SUSPENDED_REASON|
	<IfModule mod_env.c>
		SetEnv reason |SUSPENDED_REASON|
	</IfModule>
	|*endif|

	<Directory |DOCROOT|>
|*if CGI=""|
		|ALLOW_OVERRIDE|
		Options -ExecCGI
|*endif|
|*if HAVE_PHP1_FPM="1"|
		RewriteOptions InheritBefore
		RewriteCond %{REQUEST_FILENAME} -f
		RewriteCond %{REQUEST_FILENAME} \.php$
		RewriteRule ^/?(.*\.php(/.*)?)$ fcgi://socket=\%2fusr\%2flocal\%2fphp|PHP1_RELEASE|\%2fsockets\%2f|USER|.sock|DOCROOT|/$1 [P,E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|*endif|
|*if HAVE_PHP2_FPM="1"|
		RewriteOptions InheritBefore
		RewriteCond %{REQUEST_FILENAME} -f		
		RewriteCond %{REQUEST_FILENAME} \.php|PHP2_ RELEASE|$
		RewriteRule ^/?(.*\.php|PHP2_RELEASE|(/.*)?)$ fcgi://socket=\%2fusr\%2flocal\%2fphp|PHP2_RELEASE|\%2fsockets\%2f|USER|.sock|DOCROOT|/$1 [P,E=HTTP_AUTHORIZATION:% [P,E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|*endif|
|*if HAVE_PHP1_FCGI="1"|
		<IfModule mod_fcgid.c>
			<FilesMatch "\.php$">
				AddHandler fcgid-script .php
				FCGIWrapper "/usr/local/safe-bin/fcgid|PHP1_RELEASE|.sh /usr/local/directadmin/data/users/|USER|/php/|DOMAIN|.ini" .php
				Options +ExecCGI
			</FilesMatch>
		</IfModule>
|*endif|
|*if HAVE_PHP2_FCGI="1"|
		<IfModule mod_fcgid.c>
			<FilesMatch "\.php|PHP2_RELEASE|$">
				AddHandler fcgid-script .php|PHP2_RELEASE|
				FCGIWrapper "/usr/local/safe-bin/fcgid|PHP2_RELEASE|.sh /usr/local/directadmin/data/users/|USER|/php/|DOMAIN|.ini" .php|PHP2_RELEASE|
				Options +ExecCGI
			</FilesMatch>
		</IfModule>
|*endif|

|*if HAVE_SAFE_MODE="1"|
		php_admin_flag safe_mode |SAFE_MODE|
|*endif|
|*if CLI="1"|
		php_admin_flag engine |PHP|
		php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f |USER|@|DOMAIN|'
|*endif|
|*if OPEN_BASEDIR="ON"|
		php_admin_value open_basedir |OPEN_BASEDIR_PATH|
|*endif|
|*if SUPHP="1"|
		suPHP_Engine |PHP|
		suPHP_UserGroup |USER| |GROUP|
		SetEnv PHP_INI_SCAN_DIR /usr/local/directadmin/data/users/|USER|/php/|DOMAIN|
|*endif|
	</Directory>
|*if HAVE_PHP_FCGI="1"|
	RewriteEngine on
	RewriteOptions inherit
|*endif|

|*if USER="brandun"|
#######################
# Directory settings for shared php scripts
        <Directory |SHARED_PHP|>
                suPHP_Engine |PHP|
                suPHP_UserGroup |USER| |GROUP|
        </Directory>
|*endif|

|HANDLERS|
|MIMETYPES|

</VirtualHost>
 
Oh... How stupid I am! I'd linked the ipv4 to the ipv6... Now I've done it right and it works!

Thank you very much. Solved.
 
I just noticed it works for domains, but not for pointers. Is there any solution for this?

Moreover, I've a specific dns zone for fs1.francescoruvolo.com, which is my hostname and this one was not updated. That's not a problem since it's a domain only and I can do it manually, however, do you happen to know why this one was not updated?

Thanks
 
Dont know about pointers and the ns1 thing, maybe you should consider to contact DA about that, maybe is a bug :)

Regards
 
I am currently running directadmin v1.43.3.
I have added the ipv6 already to my ipv4 ip with the new feature.

But i've noticed indeed it didnt add the ip to the current subdomains and pointers.

Question: now if I am updating directadmin (in the future, when the new version is available),
will it add the ipv6 addresses automatically for subdomains, or should I run a specific command ?

PS:
some users where using other MX records (not standard mailservers) and different A record for domains,
running this 'ipv6 link to ipv4' could add the standard mail MX records, and disrupt mail traffic for domains which where using other MX records.
Also if they configured another A record for the domain and www subdomain, this ipv6 address will be added for these records.
This will cause problems for visitors using v6.

So please backup your current DNS zones and recheck every domain case by case to be sure it was configured correctly.
 
I got the error Apache is working normally when my connection is on ipv6. When I link the IP it works.

Note that need to link both ipv4 and ipv6 together. If I link ipv4 to ip6 only it wont work.
 
Back
Top