Jóhannes H. Laxdal is a specialized humanoid carbon unit whose field is computers and telling lousy jokes, it has a tendency to put "well" before every sentence it utters. In here you will find its ramblings about computer-related stuff.
Debian 6 iptable config
This is just a note to myself for configuring iptables on debian 6 (and other linux derivatives).
Flush the current configuration
#iptables --flush
Create all the chains I need
#iptables -N <NAME>
Export the current config to a new config file ...
#iptables-save > /etc/iptables.default
Edit the config file and make the changes you want.
When that is done you just restore it.
#iptables-restore < /etc/iptables.default
Then we just make a simple startup script whenever the network card is going up.
#vim /etc/network/if-pre-up.d/iptables
and we put this in the script
#!/bin/bash
iptables-restore < /etc/iptables.default
and don't forget to make it executable.
#root@minecraft:~# chmod +x /etc/network/if-pre-up.d/iptables
this is extremly basic way of doing this but it's simple and simple is usually just what you need for iptables)
- johannes's blog
- Add new comment
- 1947 reads
