Get Visitor IPV4 Only?

Is it possible to configure caddy to make it only accept visitors with ipv4

for my php application i need to get the REAL IPV4 of the visitor
but i keep getting ipv6

( i’m using cloudflare … and i’m also using ’ realip cloudflare " )

Thanks

Hi @iJosephY, welcome to the Caddy community.

Simplest way to achieve this, by far, would be to just remove any AAAA records so clients don’t use IPv6 to connect.

@Whitestrake is right. In addition, you can use the bind directive to tell Caddy to bind only to an IPv4 interface.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.