• [^] # Re: Il y a ce qu'il faut dans patch-o-matic

    Posté par . En réponse au message Autoriser le réseau de 8H à 17H. Évalué à 5.


    Iptables for restricting access by time of day

    by LinuxTitli [Last updated: November 9, 2006]

    datant de 2006 on peut imaginer que le patch a depuis été appliqué à la version actuel d'IPTABLES

    man iptables

    time
    This matches if the packet arrival time/date is within a given range. All options are optional, but are ANDed when specified.

    --datestart YYYY[-MM[-DD[Thh[:mm[:ss]]]]]
    --datestop YYYY[-MM[-DD[Thh[:mm[:ss]]]]]


    Only match during the given time, which must be in ISO 8601 "T" notation. The possible time range is 1970年01月01日T00:00:00 to
    2038年01月19日T04:17:07.

    If --datestart or --datestop are not specified, it will default to 1970年01月01日 and 2038年01月19日, respectively.


    --timestart hh:mm[:ss]
    --timestop hh:mm[:ss]

    Only match during the given daytime. The possible time range is 00:00:00 to 23:59:59. Leading zeroes are allowed (e.g. "06:03") and correctly interpreted as base-10.


    [!] --monthday day[,day...]
    Only match on the given days of the month. Possible values are 1 to 31. Note that specifying 31 will of course not match on months which do
    not have a 31st day; the same goes for 28- or 29-day February.

    [!] --weekdays day[,day...]
    Only match on the given weekdays. Possible values are Mon, Tue, Wed, Thu, Fri, Sat, Sun, or values from 1 to 7, respectively. You may also
    use two-character variants (Mo, Tu, etc.).

    --utc
    Interpret the times given for --datestart, --datestop, --timestart and --timestop to be UTC.

    --localtz
    Interpret the times given for --datestart, --datestop, --timestart and --timestop to be local kernel time. (Default)

    EXAMPLES. To match on weekends, use:

    -m time --weekdays Sa,Su



    bref ca devrait pas etre trop dur