<div dir="ltr">Since at home I only have IPv4, I can't fully disable ipv4 on the squid server OS. I think the best option for me would be to configure iptables to reject ipv4 on any port other than port "3001" which is what squid is accepting ipv4 connections to. Would that be possible with iptables?<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 31, 2017 at 3:13 AM, Amos Jeffries <span dir="ltr"><<a href="mailto:squid3@treenet.co.nz" target="_blank">squid3@treenet.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 31/10/17 18:34, xpro6000 wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Unfortunately my ISP does not provide an IPv6 IP, I need to create an only IPv6 network so I can test an iphone app as required by the Apple store<br>
<br>
<a href="https://developer.apple.com/support/ipv6/" rel="noreferrer" target="_blank">https://developer.apple.com/su<wbr>pport/ipv6/</a> <<a href="https://developer.apple.com/support/ipv6/" rel="noreferrer" target="_blank">https://developer.apple.com/s<wbr>upport/ipv6/</a>><br>
<br>
</blockquote>
<br>
Squids' default behaviour is to follow BCP 177. So any use of IPv4 is a strong indication that the server used by your app is having IPv6 connectivity issues.<br>
<br>
see "Limitations of Local Testing" at <<a href="https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW1" rel="noreferrer" target="_blank">https://developer.apple.com/l<wbr>ibrary/ios/documentation/Netwo<wbr>rkingInternetWeb/Conceptual/<wbr>NetworkingOverview/Understandi<wbr>ngandPreparingfortheIPv6Transi<wbr>tion/UnderstandingandPreparing<wbr>fortheIPv6Transition.html#//<wbr>apple_ref/doc/uid/TP40010220-<wbr>CH213-SW1</a>>.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What I did was, I created a VPS with IPv6 support, I added the following to squid.conf<br>
<br>
http_port 3001<br>
acl port1 myport 3001<br>
</blockquote>
<br>
Use "myportname" ACL type. 'myport' is deprecated.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
tcp_outgoing_address 2001:19f1:9232:d4d:b757:3535:1<wbr>910:412e port1<br>
server_persistent_connections off<br>
</blockquote>
<br>
Why disabling persistence? it has nothing to do with IPv4 vs IPv6.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The config above works fine. If the website supports IPv6, it does use that IPv6 IP. But Squid uses IPv4 if the website does not support IPv6<br>
<br>
Is there anyway to prevent Squid to use IPv4 for outgoing connections?<br>
<br>
</blockquote>
<br>
IPv4 is not yet an optional protocol so technically no. But there are several ways to safely achieve IPv6-only traffic:<br>
<br>
* some DNS resolvers can be configured not to deliver A records.<br>
<br>
* ensure the NIC of the machine running Squid has no IPv4 addresses.<br>
<br>
* ensure that IPv4 space is all non-routable.<br>
<br>
* ensure your Squid machines firewall is configured to reject (_not_ drop) IPv4 packets.<br>
<br>
<br>
Notice how all of those are things you would need to do to make your network *actually* IPv6-only and have nothing directly to do with Squid.<br>
<br>
Amos<br>
______________________________<wbr>_________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org" target="_blank">squid-users@lists.squid-cache.<wbr>org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer" target="_blank">http://lists.squid-cache.org/l<wbr>istinfo/squid-users</a><br>
</blockquote></div><br></div></div></div>