Get Visitor IPV4 Only?


(Youcef Badaoui) #1

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


(Matthew Fay) #2

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.


(Matt Holt) #3

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