Iptables Cheatsheet

Various stuff I forget how I do it. View iptables # View iptables sudo iptables -nvL Add/Remove/Replace # Add a rule iptables -A INPUT -p tcp --dport 80 -j ACCEPT # Append to end of chain iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT # Insert at position 1 in chain # Delete a rule iptables -D INPUT 5 # 5 is index 5 in the INPUT-chain # Replace a rule iptables -R INPUT 1 -p tcp -s 192....

Guests are offline

This is a very broad title, and will probably not help anyone except for me if this happens for me again. One day when I had to restart my KVM host, none of my guests had internet connection. The eth0 on the KVM host was attached to a bridge (br0) and that host had connectivity through the bridge. Here are some configs (which had not changed since it worked): # /etc/network/interfaces source /etc/network/interfaces....