[RIJEŠENO] iptables time modul
Moderator/ica: Moderatori/ce
-
tech_soul8
- Postovi: 177
- Pridružen/a: 26 pro 2010, 16:12
- OS: Debian
Re: iptables time modul!
Kuzim sad da, ali u manu pise da po defaultu koristi kernel vrijeme - lokalno. Mozda je neki bug jer mi je tip odg.bio na linuxquestions.org da mu radi sve tako kako sam ja napisao samo on ima verziju iptablesa 1.4.10 dok je moja 1.4.8. :O
-
tech_soul8
- Postovi: 177
- Pridružen/a: 26 pro 2010, 16:12
- OS: Debian
Re: iptables time modul!
Kakav kretenNetko je napisao/la:tech_soul8 je napisao/la: Mada je moguce da starije verzije koriste i kernel time iltiga hardware clock(ono u biosu)...
Hvala svima jos jednom na pomoci!
- iv@n
- Site Admin
- Postovi: 7631
- Pridružen/a: 01 pro 2007, 18:12
- Spol: M
- OS: openSUSE TW
- Lokacija: Vinkovci, Hrvatska
- Kontakt:
Re: iptables time modul!
Pa nisam ja ovom momku uzalud pravio fan klub!glaskoncILLa je napisao/la:raditi ce ti ako smanjis vrijeme u iptabelsima za sat vremena, testirano na debianu.
To avoid criticism ~ do nothing, say nothing, be nothing.
Re: iptables time modul!
Ne zapravo ja sam u krivu(sto se tice onog dijela da je kernel time zapravo hardware clock), opet, ispricavam se... Kernel vrijeme je isto UTC kolko kuzim... Evo pripadajuce sekcije iz man-a(iptables v1.4.12.1)
Znaci ipak ces vjerojatno morat oduzimat sat vremena od naseg timezone vremena, cak i dva sad kad budemo imali ljetno racunanje vremena pa vodi racuna o tome...
Kolko kuzim kernel koristi UTC kao vrijeme i --kerneltz je opcija koja omogucuje koristenje kernel timezone-a kojeg morate postavit neznam ni ja kako...time
This matches if the packet arrival time/date is within a given range.
All options are optional, but are ANDed when specified. All times are
interpreted as UTC by default.
...
--kerneltz
Use the kernel timezone instead of UTC to determine whether a
packet meets the time regulations.
About kernel timezones: Linux keeps the system time in UTC, and always
does so. On boot, system time is initialized from a referential time
source. Where this time source has no timezone information, such as
the x86 CMOS RTC, UTC will be assumed. If the time source is however
not in UTC, userspace should provide the correct system time and time‐
zone to the kernel once it has the information.
Local time is a feature on top of the (timezone independent) system
time. Each process has its own idea of local time, specified via the
TZ environment variable. The kernel also has its own timezone offset
variable. The TZ userspace environment variable specifies how the UTC-
based system time is displayed, e.g. when you run date(1), or what you
see on your desktop clock. The TZ string may resolve to different
offsets at different dates, which is what enables the automatic time-
jumping in userspace. when DST changes. The kernel's timezone offset
variable is used when it has to convert between non-UTC sources, such
as FAT filesystems, to UTC (since the latter is what the rest of the
system uses).
The caveat with the kernel timezone is that Linux distributions may
ignore to set the kernel timezone, and instead only set the system
time. Even if a particular distribution does set the timezone at boot,
it is usually does not keep the kernel timezone offset - which is what
changes on DST - up to date. ntpd will not touch the kernel timezone,
so running it will not resolve the issue. As such, one may encounter a
timezone that is always +0000, or one that is wrong half of the time
of the year. As such, using --kerneltz is highly discouraged.
Znaci ipak ces vjerojatno morat oduzimat sat vremena od naseg timezone vremena, cak i dva sad kad budemo imali ljetno racunanje vremena pa vodi racuna o tome...
-
tech_soul8
- Postovi: 177
- Pridružen/a: 26 pro 2010, 16:12
- OS: Debian
Re: [RIJEŠENO] iptables time modul
Hm.. ok ajmo rec da kuzim da. Znaci da zakljucimo! Iptables koristi utc vrijeme.
Koja mi je sad razlika izmedju system vremena i kernel vremena i localtime-a?
Onaj dio s ntp serverom i zasto to ne rjesava prob.kuzim. ali sta ne pise u man-u da iptables koriste lokalno vrijeme po defaultu?
Koja mi je sad razlika izmedju system vremena i kernel vremena i localtime-a?
Onaj dio s ntp serverom i zasto to ne rjesava prob.kuzim. ali sta ne pise u man-u da iptables koriste lokalno vrijeme po defaultu?
-
Lutherus
Re: [RIJEŠENO] iptables time modul
ntp server je korisno staviti kao daemon da se ovježava kod boota. Bed je recimo na laptopu koj u trenutku boota ako nije na žici nije na netu. Hwclock nemora nužno biti precizan. Meni preko njega sat ide 1 sat unaprijed.