Author Topic: How enabled and configure ipv6 for work with apache / cwp / centos 7 & 8  (Read 13310 times)

0 Members and 1 Guest are viewing this topic.

Offline
**
Hi,

After my various problems to be able to have the web operational through ipv6 and to be able to solve it, I have decided to make this small mini guide.

After installing Centos 7 or 8, in my case it comes in a configuration file that ipv6 is disabled, a priori, in a clean installation of centos 8 it is activated by default, but it does not hurt, perform these checks / adjustments.

Code: [Select]
nano /etc/sysctl.confAnd add at the end of file:
Code: [Select]
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.all.disable_ipv6 = 0
Its possible you view some line like the above about net.ipv6.... delete and replace for this.

Save the file.

Now:
Code: [Select]
nano /etc/sysconfig/networkAnd add this line:
Code: [Select]
NETWORKING_IPV6=yesAnd now, restart:
Code: [Select]
shutdown -r now
After this, we need add ipv6 AAAA record, in my case, in main panel (ip:2031) I can't, impossible for me.
I can add this ipv6 record in control panel (ip:2083), in this panel, I can add ipv6 record without problem.
We add the ipv6 record.

After this, we go to edit vhost for accept connection via ipv6.

WebServer Settings-Webservers Conf Editor.
/usr/local/apache/conf.d/vhosts.

Then, click in edit in the domain.com.conf.

Search the lines (are 4) that start with:
Code: [Select]
<VirtualHost THE IP4:80>And just add this:
Code: [Select]
<VirtualHost [THE IP6]:80 THE IP4:80>Note, important enter the ipv6 with []
In this file, are 4 lines for add this.

Save.

Now, the same with the file domain.com.ssl.conf
In this case, we add:
Code: [Select]
<VirtualHost [THE IP6]:443 THE IP4:443>Also, in my case, are 4 lines for add the ipv6.

Then, restart apache:
Code: [Select]
systemctl restart httpd
This is all, I wait can help to some user.
« Last Edit: December 09, 2020, 11:45:34 AM by Igor S. »

Offline
*****
Re: How enabled and configure ipv6 for work with apache / cwp / centos 7 & 8
« Reply #1 on: December 09, 2020, 04:41:57 AM »
Thanks for posting that.

I'll give it a try.

Offline
**
Re: How enabled and configure ipv6 for work with apache / cwp / centos 7 & 8
« Reply #2 on: December 09, 2020, 08:36:19 AM »
@admin, I can't edit the post, edit and fix my last code, I don't end my last code.

Offline
*****
Re: How enabled and configure ipv6 for work with apache / cwp / centos 7 & 8
« Reply #3 on: December 09, 2020, 09:20:44 AM »
@admin, I can't edit the post, edit and fix my last code, I don't end my last code.

Hi, what do you want to edit?
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
**
Re: How enabled and configure ipv6 for work with apache / cwp / centos 7 & 8
« Reply #4 on: December 09, 2020, 09:39:35 AM »
@admin, I can't edit the post, edit and fix my last code, I don't end my last code.

Hi, what do you want to edit?

This:

Now, the same with the file domain.com.ssl.conf
In this case, we add:

Code: [Select]
<VirtualHost [THE IP6]:443 THE IP4:443>[/coded]
Also, in my case, are 4 lines for add the ipv6.

Then, restart apache:
[code]systemctl restart httpd


For this:
Now, the same with the file domain.com.ssl.conf
In this case, we add:

Code: [Select]
<VirtualHost [THE IP6]:443 THE IP4:443>Also, in my case, are 4 lines for add the ipv6.

Then, restart apache:
Code: [Select]
systemctl restart httpd
« Last Edit: December 09, 2020, 09:42:27 AM by Wonder »

Offline
*****
Re: How enabled and configure ipv6 for work with apache / cwp / centos 7 & 8
« Reply #5 on: December 09, 2020, 11:46:05 AM »
Is it fixed?
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
**
Re: How enabled and configure ipv6 for work with apache / cwp / centos 7 & 8
« Reply #6 on: December 09, 2020, 11:51:36 AM »

Offline
*****
Re: How enabled and configure ipv6 for work with apache / cwp / centos 7 & 8
« Reply #7 on: December 10, 2020, 02:41:12 AM »
@Wonder did everything you suggested, but still not working.

I have a /64 allocation, and used a tool for a certain IP (Just copied the IPv4 into the IPv6 - lol)

Specified that IP [2605:a140:2045:8941:0:30:40b7:f60d]:80 and :443

You have the port's outside the IP bracket.
Created the AAAA record.
Restarted Apache.

But when I try to connect, just using the IP [2605:a140:2045:8941:0:30:40b7:f60d], it isn't working.

Also when I look at the .conf files, the IPv6 is gone.

Do I need to rebuild the webserver?

Any suggestions?

Thanks.
« Last Edit: December 10, 2020, 02:51:20 AM by Starburst »

Offline
**
Re: How enabled and configure ipv6 for work with apache / cwp / centos 7 & 8
« Reply #8 on: December 10, 2020, 11:43:13 AM »
@Wonder did everything you suggested, but still not working.

I have a /64 allocation, and used a tool for a certain IP (Just copied the IPv4 into the IPv6 - lol)

Specified that IP [2605:a140:2045:8941:0:30:40b7:f60d]:80 and :443

You have the port's outside the IP bracket.
Created the AAAA record.
Restarted Apache.

But when I try to connect, just using the IP [2605:a140:2045:8941:0:30:40b7:f60d], it isn't working.

Also when I look at the .conf files, the IPv6 is gone.

Do I need to rebuild the webserver?

Any suggestions?

Thanks.

Hi @Starburst.

Some doubts about your issue / problem.

For know the ipv6, after made the changes in the files /etc/sysctl.conf and /etc/sysconfig/network and restart the server, you know the ipv6 with the command ifconfig, you need view the line that end in global, not with link.
This is your ipv6.

About:
Quote
Specified that IP [2605:a140:2045:8941:0:30:40b7:f60d]:80 and :443
You need indicate the ipv6 with por 80 in the "normal" domain.com.conf and the 443 in the ssl file.

If you have csf firewall you need enable ipv6 (not open the ports, just only enabled ipv6, this point I forgot in my first post).

Created the AAAA records is before edit the vhost files.

You don't need rebuild webservers, only restart httpd or server.

But other point, if you are created the AAAA records you need point or configure the ipv6 records in your domain registrar.

In my case, my isp (of my house) not have ipv6 and I'm in cloudflare, for view all work fine, I deleted the A record in cloudflare, and only have the AAAA record in cloudflare, then view how connect well to the site.
But if you aren't in cloudflare, you need create the AAAA records in you domain registrar and need to wait 12/24 for propagation this dns records.

I made a ping to your ipv6 and indicate 100% packet loss.
In this page: http://ipv6now.com.au/pingme.php

Are you sure this is your ipv6 this: 2605:a140:2045:8941:0:30:40b7:f60d ?

Regards.

Offline
*****
Re: How enabled and configure ipv6 for work with apache / cwp / centos 7 & 8
« Reply #9 on: December 11, 2020, 04:53:30 AM »
I want to kill the person who thought up IPv6...

So the IPv6 allocation is 2605:a140:2045:8941::1/64

Now normally with IPv4 the system is smart enough to understand (the whole network range) that it goes from 2605:a140:2045:8941::1 to 2605:a140:2045:8941::ffff

But NO. Doesn't seem to do that with IPv6, unless I missed some simple step.
And if I did, please let me know!

In the ifcfg-eth0 file I had to add:
IPV6ADDR_SECONDARIES="2605:a140:2045:8941::2 2605:a140:2045:8941::3 2605:a140:2045:8941::4 2605:a140:2045:8941:0:30:40b7:f60d"
(Just to start)

Once I did, BAM, it worked.

Running CWPpro 0.9.8.1026 on CentOS 8.3.2011
(Yes, we just finished migrating 2 weeks ago - Fraking IBM/RedHat)

Offline
**
Re: How enabled and configure ipv6 for work with apache / cwp / centos 7 & 8
« Reply #10 on: December 11, 2020, 10:04:13 AM »
Yes, all its ok, the person who think in ipv6...its for kill...hehehe.

Quote
In the ifcfg-eth0 file I had to add:
IPV6ADDR_SECONDARIES="2605:a140:2045:8941::2 2605:a140:2045:8941::3 2605:a140:2045:8941::4 2605:a140:2045:8941:0:30:40b7:f60d"
(Just to start)
This is just that you was need for work with ipv6, config in ifcfg-eth0, only in this.
In the vhost files, with /64 I think its sufficient for work.

I'm very glad it works for you, and if I could be of help, all the better.

Offline
*****
Re: How enabled and configure ipv6 for work with apache / cwp / centos 7 & 8
« Reply #11 on: December 11, 2020, 08:39:08 PM »
Yes, all its ok, the person who think in ipv6...its for kill...hehehe.

Quote
In the ifcfg-eth0 file I had to add:
IPV6ADDR_SECONDARIES="2605:a140:2045:8941::2 2605:a140:2045:8941::3 2605:a140:2045:8941::4 2605:a140:2045:8941:0:30:40b7:f60d"
(Just to start)
This is just that you was need for work with ipv6, config in ifcfg-eth0, only in this.
In the vhost files, with /64 I think its sufficient for work.

I'm very glad it works for you, and if I could be of help, all the better.

For some reason, if the address isn't listed there, the server doesn't ressond to it, and in turn CWP doesn't.

Offline
**
Re: How enabled and configure ipv6 for work with apache / cwp / centos 7 & 8
« Reply #12 on: December 11, 2020, 11:54:55 PM »
Yes, all its ok, the person who think in ipv6...its for kill...hehehe.

Quote
In the ifcfg-eth0 file I had to add:
IPV6ADDR_SECONDARIES="2605:a140:2045:8941::2 2605:a140:2045:8941::3 2605:a140:2045:8941::4 2605:a140:2045:8941:0:30:40b7:f60d"
(Just to start)
This is just that you was need for work with ipv6, config in ifcfg-eth0, only in this.
In the vhost files, with /64 I think its sufficient for work.

I'm very glad it works for you, and if I could be of help, all the better.

For some reason, if the address isn't listed there, the server doesn't ressond to it, and in turn CWP doesn't.

In my case / tests, I don't have added in this config/file, but I have only one ipv6 per server.

When I was read your problem, I was made a ping6 to your ipv6 and not respond, its possible, in your isp your need add like you indicate, when I don't was have configured my ipv6, the ping6 respond to my ipv6 (only install centos).

Maybe, some about the isp...its very possible...

Offline
*
hello
i try to add ipv6 AAAA records , it says not valid
ipv6 already enabled
ipv6 address 2602:fe90:300:1a2::b26d:2f4c
when i try ipv a
also get same ipv6 address
i can not add AAAA records
CentOS Linux release 7.9.2009 (Core)
CWPpro version: 0.9.8.1139
is this a bug ?
i dont know whats the wrong
any suggestions ?

Offline
*
never mind. cwp pro bugs.
impossible to enter cwp. always error
manually edit file and done.
hope they fix this bugs next update