Windows에서 프록시 주소를 DNS 이름에서 IP로 변경
이 가이드는 Windows에서 프록시 DNS hostname(예:proxy.company.com)을 raw IP address로 교체하는 방법을 수동으로 그리고 PowerShell 사용 시 각각 설명합니다.
다음과 같은 환경에서 유용합니다:
- DNS 확인이 불안정하거나 차단됨
- 인증서 신뢰 또는 네트워크 지연 문제가 발생함
- 명시적인 송신 IP 기반 액세스 제어가 필요함
수동 방법 (Internet Options)
- Control Panel을 실행한 다음 Internet Options를 엽니다.
- Connections 탭으로 이동합니다.
- LAN Settings를 클릭합니다.
- Under Proxy server, enable the checkbox:
proxy.company.com을 프록시 IP(예:192.168.1.10)로 바꿉니다.- 포트(일반적으로
8080)를 설정합니다.
- OK를 클릭한 다음 Apply를 클릭합니다.
이 설정은 WinINET 프록시 스택을 사용하는 대부분의 애플리케이션(예: Internet Explorer, Microsoft Edge Legacy, Office 앱)에 적용됩니다.
스크립트 방식 (PowerShell)
이 PowerShell 스크립트를 사용하여 IP 주소로 WinHTTP 및 WinINET 프록시 설정을 모두 구성합니다:
# Define proxy IP and port
$proxyIP = "http://192.168.1.10:8080"
# List of domains to bypass proxy
$bypassList = "localhost;127.0.0.1;*.microsoftonline.com;*.core.windows.net"
# Configure proxy for WinHTTP (used by system services like Intune, Windows Update)
netsh winhttp set proxy $proxyIP ";$bypassList"
# Configure proxy for WinINET (used by most user apps and browsers)
$regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
Set-ItemProperty -Path $regPath -Name ProxyEnable -Value 1
Set-ItemProperty -Path $regPath -Name ProxyServer -Value $proxyIP
Set-ItemProperty -Path $regPath -Name ProxyOverride -Value $bypassList