You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

OCI: How To Disable IPv6 Listening on Port 80 for Nginx

Applies To:

Oracle Cloud Infrastructure
Linux x86-64

Goal:

In a OCI Oracle Linux instance where both IPv4 and IPv6 are enabled by default, when installing and starting nginx web server from the Oracle provided repository packages, the service listens by default on port 80 both using IPv4 and IPv6:

# netstat -tanp | grep nginx
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 32494/nginx: master
tcp6 0 0 :::80 :::* LISTEN 32494/nginx: master

This is the default behavior, and it is to be expected. But in this case there is a specific need to only listen on the IPv4 address.

Solution:

To disable listening on port 80 using IPv6 in a standard installation of nginx:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!