Skip to content

Instantly share code, notes, and snippets.

@PreetSangha
Created September 26, 2022 10:06
Show Gist options
  • Save PreetSangha/32a4ecd802bbdae008d9d9f44c90327d to your computer and use it in GitHub Desktop.
Save PreetSangha/32a4ecd802bbdae008d9d9f44c90327d to your computer and use it in GitHub Desktop.
port proxy in a windows for pihole host
# show proxies
netsh interface portproxy show all
# set a proxy for port port 54 from 127.0.0.1 to IP.AD.RE.SS, where IP.AD.RE.SS is the address of the pihole container
# (get ip address by docker exec -it pihole ip route get 1.0.0.0)
nnetsh interface portproxy add v4tov4 connectport=53 connectaddress=127.0.0.1 listenport=53 listenaddress= IP.AD.RE.SS
# delete the port proxy
netsh interface portproxy delete v4tov4 listenport=53 listenaddress=127.0.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment