시간대 변경 시 iptables는 어떻게 작동합니까?

시간대 변경 시 iptables는 어떻게 작동합니까?

시간대가 변경될 때 iptables가 iptables의 정보를 계속 변경하는 방법이 의심됩니다. 나는 iptables sv 1.4.8을 사용하고 있습니다.

다음 세부정보로 IP 1개를 차단했습니다.

 # date
    Thu Jun 6 12:46:42 IST 2013

#iptables -A INPUT -s 10.0.3.128 -m time --datestart 2013-6-6T12:0:00 --datestop 2013-6-6T13:0:00 -j DROP

# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
DROP all -- 10.0.3.128 anywhere TIME starting from 2013-06-06 12:00:00 until date 2013-06-06 13:00:00

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

하지만 시간대를 변경한 후에는 다음과 같은 일이 자동으로 발생했습니다.

시간대 변경 후 +++++++++++++++++++++++

#date
Thu Jun 6 15:17:48 HKT 2013

# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
DROP all -- 10.0.3.128 anywhere TIME starting from 2013-06-06 14:30:00 until date 2013-06-06 15:30:00

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
#

규칙에서 시간 값이 변경됩니다. 시간대에 따라 어떻게 변하는가. iptables가 시간대를 추적하는 곳.

친절하게 설명해주세요.

답변1

아무것도 추적하지 않습니다. 문자열을 원시로 변환 2013-6-6T12:0:00했습니다 2013-6-6T13:0:00.time_t규칙을 추가할 때 그 당시 설정한 시간대를 사용합니다. 그런 다음 나중에 를 실행하면 -L해당 타임스탬프가 새로운 현재 시간대를 사용하여 읽을 수 있는 문자열로 다시 변환됩니다.

초기 명령에 암시된 시간대 정보는 실행이 완료된 직후 손실되었으며 모든 실행 시 iptables -L현재 시간대를 time_t.

관련 정보