Internal curl IPv4

Linode Staff

I deployed nginx to serve my website https://example.com

If I execute the command "curl -I https://example.com" in my Linode console, the request IP(client ip) is from an IPv6 address(server address itself), which i checked in nginx access log. If I run the same command in my laptop, the request ip is from my laptop's IPv4 IP address.

How do I configure the system to use IPv4 in the server console?

1 Reply

Hello,

To set IPv4 as the prefered record for web calls I suggest making changes in the /etc/gai.conf file. You can change this by uncommenting the below line.

From

#precedence ::ffff:0:0/96 100

To

precedence ::ffff:0:0/96 100

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct