윈도우 와이어가드를 보조네트워크로 사용하는 방법이 있어요.
1. 레지스트리 건드리기.
vpn 연결과 해제 과정에서 파워셸 스크립트 실행이 요구되어서 레지스트리에 제한 설정을 해제해야 해요.
reg add HKLM\Software\WireGuard /v DangerousScriptExecution /t REG_DWORD /d 1 /f
2. 설정 살펴보기.
Table = off 설정을 넣으면 자동으로 라우팅 테이블을 등록하지 않아요. PostUp 명령어에서 수동으로 라우팅 테이블을 등록하면서 높은 번호로 인터페이스 메트릭을 주면 우선순위가 낮아져서 보조네트워크로 사용하게 되어요. 연결을 해제할때 PostDown 명령어에서 등록하였던 라우팅 경로를 지워주어야 하겠쩌.
[Interface]
PrivateKey = ...
Address = 172.16.0.2/32, 2606:4700:110:816c:d795:6baf:b09c:693e/128
DNS = 1.1.1.1, 1.0.0.1, 8.8.8.8, 8.8.4.4
DNS = 2606:4700:4700::1111, 2606:4700:4700::1001, 2001:4860:4860::8888, 2001:4860:4860::8844
MTU = 1384
PostUp = powershell -command "$wgInterface = Get-NetAdapter -Name %WIREGUARD_TUNNEL_NAME%; route add 0.0.0.0 mask 0.0.0.0 0.0.0.0 IF $wgInterface.ifIndex metric 95"
PreDown = powershell -command "$wgInterface = Get-NetAdapter -Name %WIREGUARD_TUNNEL_NAME%; route delete 0.0.0.0 mask 0.0.0.0 0.0.0.0 if $wgInterface.ifIndex metric 95"
Table = off
[Peer]
PublicKey = ...
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = engage.cloudflareclient.com:2408
git.zx2c4.com/wireguard-windows - Registry Keys for Admins
댓글이 사용 중지되었습니다.