Linux

[Linux] 방화벽 설정

Se Story 2007. 4. 11. 01:14

방화벽 상태 알아보기
service iptables status

방화벽 올리고 내리기
service iptables stop
service iptables start

###2010.03.24 추가 START  ####

iptables 설정 값의 저장을 위한 명령어

service iptbales save

상기 명령을 사용하여 설정값들을 저장한다.

###2010.03.24 추가  END####

방화벽 설정 수정하기
vi /etc/sysconfig/iptables

방화벽 해제
iptable -F 혹은
ipchains -F 를 입력하세요.

redhat 9.0이상 이라면 lokkit 으로 방화벽 설정을 할 수 있다.


Usage: lokkit [OPTION...]
-f, --fwtype Write Red Hat style
/etc/sysconfig/iptables rules,
instead of a shell script
-q, --quiet Run noninteractively; process
only command-line arguments
-n, --nostart Configure firewall but do not
activate it
--high Enable 'high' security level
(default)
--medium Enable 'medium' security level
--disabled Disable firewall
--dhcp Allow DHCP through the firewall
-p, --port=port:protocol (e.g, ssh:tcp)Allow specific ports through the
firewall
-t, --trust=device to trust Allow all traffic on the
specified device

Help options:
-?, --help Show this help message
--usage Display brief usage message


lokkit -q --disabled 라고 하면 방화벽이 해제됩니다.
iptables -F라고 직접 명령을 주어도 됩니다 F는 Flush 를 뜻합니다.
Kernel 2.2대의 linux 배포판이라면 ipchains -F 하면 됩니다.