First, you need to create a firewall script. You may use, for example, example given by bin earlier in this thread. Give a name for your script (for example firewall.up or something) and save it somewhere (for example to /root).
Then open up /etc/network/interfaces with text editor. It will contain something along these lines: Code: # The primary network interface
auto eth0
iface eth0 inet static
address 193.210.*.*
netmask 255.255.255.0
network 193.210.*.*
broadcast 193.210.*.*
gateway 193.210.*.*
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 193.210.18.18 193.210.19.19 193.210.19.120
You need to add "pre-up /root/firewall.up" to this configuration. As far as I have been able to determine, pre-up runs a script before bringing up network interface. So, after you make changes, your eth0 (or whatever your main network interface is) configuration will look something like this: Code: # The primary network interface
auto eth0
iface eth0 inet static
address 193.210.*.*
netmask 255.255.255.0
network 193.210.*.*
broadcast 193.210.*.*
gateway 193.210.*.*
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 193.210.18.18 193.210.19.19 193.210.19.120
pre-up /root/firewall.up
Hopefully this helps  |