Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've had an init script for many years that configures iptables for me and it has worked like a champ until now. After upgrading from 10.04 to 12.04 I started having firewall problems where the rulesets were being corrupted. After some playing around I discovered that something is setting the following rules:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:53
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:53
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:67
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:67

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  0.0.0.0/0            192.168.122.0/24     state RELATED,ESTABLISHED
ACCEPT     all  --  192.168.122.0/24     0.0.0.0/0           
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-port-unreachable
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-port-unreachable

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

even when I've completely disabled my own firewall script. My first thought was ufw was somehow active - but it isn't:

# ufw status
Status: inactive

It may or may not be related, but I've only seen this problem on machines I am running kvm on.

Does anyone have pointers to what could be doing this and how to disable whatever is adding these unwanted rules?

Edit for people looking for this in the future: I finally located a source that definitively links these mystery iptables rules to libvirt: http://libvirt.org/firewall.html

share|improve this question

1 Answer

Is it a multi-homed machine? What's on the 192.168.122.0/24 CIDR? Is there an interface listening on one of the IPs from within that range? I'd probably try to look at the output of:

grep -R 192.168.122 /etc

to find out if there's any configuration related to it and also check cron entries in /etc/cron*

share|improve this answer
The 192.168.122 is coming off of virbr0 (created by KVM). What is causing me the most headache is the changes to the default rules. My firewall uses default DROP. The changes use default ACCEPT. I usually end up with a garbage ruleset where the default rules are mine, but the specific rules are the above. Resulting in the firewall blocking almost everything. – Benjamin Franz Dec 9 '12 at 17:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.