[lxc-users] iptables-save not working in unprivileged containers?

Tomasz Chmielewski mangoo at wpkg.org
Mon Nov 9 15:57:07 UTC 2015


For some, reason, iptables-save does not seem to be working in 
unprivileged containers.

To reproduce:

- this adds a sample iptables rule:

# iptables -A INPUT -p tcp --dport 22 -j ACCEPT


- this lists the rule:

# iptables -L -v -n
Chain INPUT (policy ACCEPT 13166 packets, 5194K bytes)
  pkts bytes target     prot opt in     out     source               
destination
     0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            
0.0.0.0/0            tcp dpt:22

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
  pkts bytes target     prot opt in     out     source               
destination

Chain OUTPUT (policy ACCEPT 12620 packets, 656K bytes)
  pkts bytes target     prot opt in     out     source               
destination


- this is supposed to dump iptables rules to stdout - but it doesn't:

# iptables-save
#


Any idea how to make "iptables-save" working in unprivileged lxc 
containers?


Tomasz Chmielewski
http://wpkg.org



More information about the lxc-users mailing list