linux, ubuntu
리눅스 방화벽 iptables
아이셩짱셩
2021. 7. 14. 15:08
728x90
- 본인 IP 확인
$ ifconfig
- target ip 방화벽 확인
$ telnet ip port
- 방화벽 등록
- 확인 : iptables -nL {-line-numbers}
- 삽입 : iptables -I INPUT 1 -s 111.111.111.111 -p tcp –dport 2000 -j ACCEPT
- 삽입 : iptables -I chain-incoming-ssh 1 -s 192.168.1.140 -j ACCEPT
- 삽입 : iptables -I IN_public_allow 1 -s 0.0.0.0/0 -p tcp --dport 8888 -m conntrack --ctstate NEW,UNTRACKED -j ACCEPT
- 초기화(?) :firewall-cmd --reload
- [centOS8 ↑] firewall
728x90