How to hide ipv4 in squid proxy?

I have a NAT vps running Ubuntu 20.04 and I want to setup a ipv6 proxy server so I've installed squid proxy. How do I remove ipv4 address so sites that support dual stack can only see your ipv6 address? squid proxy doesn't seem to have an option to hide/disable ipv4 so I don't know what other ways that can remove ipv4.

Tagged:

Comments

  • ShakibShakib Hosting Provider

    Why don't you remove IPv4 from the OS completely?

    HostCram LLC - Web Hosting Built For Speed, Reliability, Security & Uptime! [We operate AS39618]

  • edited December 2021

    @Ruriko said:
    How do I remove ipv4 address so sites that support dual stack can only see your ipv6 address?

    I think you might underestimate how much of the web does NOT support IPv6 for web traffic. Preferring IPv6 is the default option for Squid see: http://www.squid-cache.org/Doc/config/dns_v4_first/ so usually it's the opposite question. If Squid uses IPv4 it's because it needs to, if you remove/disable IPv4 fallback, much will break.

    Edit: Are you wedded to using Squid? TinyProxy has a bind directive that should achieve what you want, but the same caveat applies.

  • @Shakib said:
    Why don't you remove IPv4 from the OS completely?

    How do you remove ipv4 from the OS?

    @cochon said:

    @Ruriko said:
    How do I remove ipv4 address so sites that support dual stack can only see your ipv6 address?

    I think you might underestimate how much of the web does NOT support IPv6 for web traffic. Preferring IPv6 is the default option for Squid see: http://www.squid-cache.org/Doc/config/dns_v4_first/ so usually it's the opposite question. If Squid uses IPv4 it's because it needs to, if you remove/disable IPv4 fallback, much will break.

    Edit: Are you wedded to using Squid? TinyProxy has a bind directive that should achieve what you want, but the same caveat applies.

    That's ok if a site doesn't support ipv6 cause the site that I'll be using the proxy on supports both. Any script is fine as long it can be installed on 256ram vps. How do I remove/disable IPv4 fallback?

  • AdvinAdvin Hosting Provider
    edited December 2021

    @Ruriko said:

    @Shakib said:
    Why don't you remove IPv4 from the OS completely?

    How do you remove ipv4 from the OS?

    I assume you'd just remove it from the network configuration so that it's IPv6 only

  • edited December 2021

    @Ruriko said:

    ...the site that I'll be using the proxy on supports both.

    Then Squid will use IPv6 to contact that website, not IPv4, problem solved.

    Removing IPv4 still seems a sledgehammer to crack a nut, but as @Advin suggests remove the IPv4 bit from the network config.

    If you're fearful the site might take steps to find your IPv4 don't forget there are many other ways for them to do that, you'd be better with a VPN not a proxy.

    BTW if you have only 256MB, Tinyproxy is probably a better option than Squid anyway, which will do what you want.

    Edit: You might want to explain why you don't want to use/reveal the NATed IPv4 on the VPS, it's not your local IP address that would be revealed.

  • dns_v4_first off
    acl to_ipv6 dst ipv6
    http_access deny !to_ipv6
    http_access allow to_ipv6

    Thanked by (1)Ruriko
Sign In or Register to comment.

This Site is currently in maintenance mode.
Please check back here later.

→ Site Settings