Bug in owner module
Hi, i have some issue with module (owner) in iptables v1.4.14 (debian wheezy 7.2.0)
Current rule fails:
iptables -t nat -A OUTPUT -o eth0 -p tcp -s x.x.x.x -m owner --gid-owner usergroup -j DNAT --to-destination x.x.x.x:80;
I tried to use numeric gid, it failed too..
But this rule works fine:
iptables -t nat -A OUTPUT -o eth0 -p tcp -s x.x.x.x -m owner --uid-owner user -j DNAT --to-destination x.x.x.x:80;
Is it possible to fix this bug ?
Thanks!
Quoted 2 lines · ZenSecurity
Hi, i have some issue with module (owner) in iptables v1.4.14 (debian wheezy 7.2.0)
what kernel version?
Quoted 6 lines
Current rule fails:
iptables -t nat -A OUTPUT -o eth0 -p tcp -s x.x.x.x -m owner --gid-owner usergroup -j DNAT --to-destination x.x.x.x:80;
I tried to use numeric gid, it failed too..
Fails how?? Can't add the rule? Doesn't match? More details please.
Phil
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · ZenSecurity
Kernel version: Linux lab 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1
x86_64GNU/Linux# iptables -t nat -L DNAT tcp -- domain.com anywhere owner GID match usergroup to: X.X.X.X:80
Quoted 5 lines
Rule:
iptables -t nat -A OUTPUT -o eth0 -p tcp -s X.X.X.X -m owner --gid-owner usergroup -j DNAT --to-destination X.X.X.X:80;Doesn't match (usergroup exist).
Works fine here, on kernel.org kernel.
[root@f20_main ~]# uname -r
3.13.0-rc1+
[root@f20_main ~]# iptables -t nat -A OUTPUT -m owner --gid-owner 1000 [root@f20_main ~]# su - phil
[phil@f20_main ~]$ id
uid=1000(phil) gid=1000(phil) groups=1000(phil) [phil@f20_main ~]$ ping -c1 10.10.10.1
PING 10.10.10.1 (10.10.10.1) 56(84) bytes of data.
64 bytes from 10.10.10.1: icmp_seq=1 ttl=64 time=1.02 ms
--- 10.10.10.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 1.022/1.022/1.022/0.000 ms [phil@f20_main ~]$ logout
[root@f20_main ~]# iptables -t nat -nvL OUTPUT Chain OUTPUT (policy ACCEPT 1 packets, 84 bytes)
pkts bytes target prot opt in out source destination
1 84 all -- * * 0.0.0.0/0 0.0.0.0/0 owner GID match 1000I suggest filing a bug with Debian bugzilla if you suspect a problem in a Debian kernel.
Phil