Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Windows 10
- GIT
- grep
- find
- context
- 네트워크
- resource
- tomcat
- netsh
- lsof
- Windows
- xargs
- profile
- 줄바꿈 문자
- Source
- vscode
- web.xml
- plugin
- IntelliJ
- Eclipse
- 단축키
- Mac
- bash
- port
- JavaScript
- VirtualBox
- ssh
- maVen
- Quartz
- import
Archives
- Today
- Total
develog
[windows] netsh 방화벽 포트 오픈/삭제/확인하기 본문
cmd(명령 프롬프트) 를 관리자 권한으로 실행한다

netsh 명령으로 포트를 오픈/삭제/확인한다
# 포트 확인하기
netsh firewall show port
netsh advfirewall firewall show rule name=all
netsh advfirewall firewall show rule name="포트오픈 22"
netsh advfirewall firewall show rule name="포트오픈 80"
netsh advfirewall firewall show rule name="포트오픈 443"
netsh advfirewall firewall show rule name="포트오픈 8080"
netsh advfirewall firewall show rule name="포트오픈 3000"
netsh advfirewall firewall show rule name="포트오픈 3306"
netsh advfirewall firewall show rule name="포트오픈 13306"
netsh advfirewall firewall show rule name="포트오픈 1521"
netsh advfirewall firewall show rule name="포트오픈 5432"
netsh advfirewall firewall show rule name="포트오픈 1433"
# 포트 오픈하기
netsh advfirewall firewall add rule name="포트오픈 22" dir=in action=allow protocol=TCP localport=22
netsh advfirewall firewall add rule name="포트오픈 80" dir=in action=allow protocol=TCP localport=80
netsh advfirewall firewall add rule name="포트오픈 443" dir=in action=allow protocol=TCP localport=443
netsh advfirewall firewall add rule name="포트오픈 8080" dir=in action=allow protocol=TCP localport=8080
netsh advfirewall firewall add rule name="포트오픈 3000" dir=in action=allow protocol=TCP localport=3000
netsh advfirewall firewall add rule name="포트오픈 3306" dir=in action=allow protocol=TCP localport=3306
netsh advfirewall firewall add rule name="포트오픈 13306" dir=in action=allow protocol=TCP localport=13306
netsh advfirewall firewall add rule name="포트오픈 1521" dir=in action=allow protocol=TCP localport=1521
netsh advfirewall firewall add rule name="포트오픈 5432" dir=in action=allow protocol=TCP localport=5432
netsh advfirewall firewall add rule name="포트오픈 1433" dir=in action=allow protocol=TCP localport=1433
netsh advfirewall firewall add rule name="포트오픈 445 SMB" dir=in action=allow protocol=TCP localport=445
netsh advfirewall firewall add rule name="포트오픈 ICMPv4 Ping" dir=in action=allow protocol=icmpv4:8,any
# 포트 삭제하기
netsh advfirewall firewall delete rule name="포트오픈 22" protocol=tcp dir=in
netsh advfirewall firewall delete rule name="포트오픈 80" protocol=tcp dir=in
netsh advfirewall firewall delete rule name="포트오픈 443" protocol=tcp dir=in
netsh advfirewall firewall delete rule name="포트오픈 8080" protocol=tcp dir=in
netsh advfirewall firewall delete rule name="포트오픈 3000" protocol=tcp dir=in
netsh advfirewall firewall delete rule name="포트오픈 3306" protocol=tcp dir=in
netsh advfirewall firewall delete rule name="포트오픈 13306" protocol=tcp dir=in
netsh advfirewall firewall delete rule name="포트오픈 1521" protocol=tcp dir=in
netsh advfirewall firewall delete rule name="포트오픈 5432" protocol=tcp dir=in
netsh advfirewall firewall delete rule name="포트오픈 1433" protocol=tcp dir=in
netsh advfirewall firewall delete rule name="포트오픈 445 SMB" protocol=tcp dir=in
netsh advfirewall firewall delete rule name="포트오픈 ICMPv4 Ping"