remoteip 모듈 활성화
sudo apachectl -M | grep remoteip
remoteip 설정 추가, 클라우드아이피 삽입
* 클라우드플레어 ip가 최신인지 확인하십시오. https://www.cloudflare.com/pt-br/ips/
vim /opt/bitnami/apache2/conf/httpd.conf
G를 눌러 맨 아래에 아래를 삽입
RemoteIPHeader CF-Connecting-IP
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy 127.0.0.1RemoteIPTrustedProxy 103.21.244.0/22
RemoteIPTrustedProxy 103.22.200.0/22
RemoteIPTrustedProxy 103.31.4.0/22
RemoteIPTrustedProxy 104.16.0.0/13
RemoteIPTrustedProxy 104.24.0.0/14
RemoteIPTrustedProxy 108.162.192.0/18
RemoteIPTrustedProxy 131.0.72.0/22
RemoteIPTrustedProxy 141.101.64.0/18
RemoteIPTrustedProxy 162.158.0.0/15
RemoteIPTrustedProxy 172.64.0.0/13
RemoteIPTrustedProxy 173.245.48.0/20
RemoteIPTrustedProxy 188.114.96.0/20
RemoteIPTrustedProxy 190.93.240.0/20
RemoteIPTrustedProxy 197.234.240.0/22
RemoteIPTrustedProxy 198.41.128.0/17RemoteIPTrustedProxy 2400:cb00::/32
RemoteIPTrustedProxy 2606:4700::/32
RemoteIPTrustedProxy 2803:f800::/32
RemoteIPTrustedProxy 2405:b500::/32
RemoteIPTrustedProxy 2405:8100::/32
RemoteIPTrustedProxy 2a06:98c0::/29
RemoteIPTrustedProxy 2c0f:f248::/32
/를 눌러 ‘LogFormat’을 검색 후, ‘<IfModule log_config_module>’ 주석 포함 밑에 있는 LogFormat 3개가 보이는데, %h를 %a로 바꾼다.
/를 눌러 ‘LoadModule remoteip’를 검색 후
# LoadModule remoteip_module modules/mod_remoteip.so
이 라인 앞의 주석 #을 제거하여 모듈을 활성화합니다:
↓
LoadModule remoteip_module modules/mod_remoteip.so
Apache를 재시작합니다:
sudo /opt/bitnami/ctlscript.sh restart apache
ipv4
103.21.244.0-103.21.247.255
103.22.200.0-103.22.203.255
103.31.4.0-103.31.7.255
104.16.0.0-104.27.255.255
108.162.192.0-108.162.255.255
131.0.72.0-131.0.75.255
141.101.64.0-141.101.127.255
162.158.0.0-162.159.255.255
172.64.0.0-172.71.255.255
172.64.0.0-172.71.255.255
188.114.96.0-188.114.111.255
190.93.240.0-190.93.255.255
197.234.240.0-197.234.243.255
198.41.128.0-198.41.255.255
ipv6
2001:db8:1234::/48
2400:cb00::/32
2405:b500::/32
2606:4700::/32
2803:f800::/32
2a06:98c0::/29
2c0f:f248::/32
2405:8100::/32