Hello, Tyler,

I works with your patch! Confirmed that with the patch, it understands the 
times as absolute ones.
I managed to test it in a virtual machine. Switching from one version to the 
other, I can verify the behaviour easily.

The command I am testing is:
sudo iptables -I OUTPUT -p tcp -m owner --uid-owner <user>  -m time --weekdays 
Su,Mo,Tu,We,Th,Fr,Sa --timestart 00:00:00 --timestop 04:30:00 -j DROP

<user> being substituted by the user to be tested.

So, when those two conditions are met (the time scheduled specified and the 
user), then tcp packets are dropped. With 5.0.0-13 kernel, time considered is 
since startup, so it rejects packets since the computer is up, no matter the 
time.
It is important to specify all the week days (or perhaps Sunday is the one that 
matters); If not specified all of them, the test may not be tested correctly 
(that was my experience)

With the new kernel, it allows those packets (unless between 00:00 and
04:30, ovbiuously). I think times are UTC based, so I test and try want
I want to specify a time.

Thanks a lot

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to iptables in Ubuntu.
https://bugs.launchpad.net/bugs/1827040

Title:
  Misbehaviour of iptables 'timestart' parameter in Ubuntu 19.04

Status in iptables package in Ubuntu:
  New
Status in linux package in Ubuntu:
  Confirmed

Bug description:
  I have detected that iptables does not behave in the same way as with 
previous kernel.
  Old behaviour:
  'timestart' referred to the absolute time (UTC or whatever) to start applying 
the rul
  New behaviour: 
  'timestart' refers to the offset since boot start

  It implies a migration of the old rules, and it is difficult to keep 
compatibility, as the offset is complex to behave as an absolute time.
  Is that expected? Man page suggests that the correct behaviour is the old one

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/iptables/+bug/1827040/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to