Location iptables config file
Hi,
I just installed debian, and want to configure iptables. Where can I find the configuratio file? Regards, Freakin'me |
I do not think that Debian has one itself. You can make your own script and put it into the rc.d-folder to make it start on boot.
|
I suppose you mean /etc/rc.d/ but that's exactly the tricky thing, I don't have that dir. I do have rc0.d up to rc6.d so I still do not know which one I should have.
I installed iptables using apt-get, maybe that does matter? |
Yes, debian has rcX.d
The number X stands for different runlevels. You should put your script in init.d and then make a symlink to the rcX.d for which runlevel you want your script to run at. Here's a good guide on the subject: http://www.tldp.org/HOWTO/From-Power...t-HOWTO-6.html EDIT: via apt-get? I thought iptables came with Debian by default. Anyway, it should not matter. As long as you can handle iptables you will be fine making your own script. If you are having troubles remembering everything you can always check the man pages. if you do not want to write your own iptables script you can google for some examples. |
If I put that script in init.d, how does iptables know that it is intended for iptables?
For me being a linux noob, I've got one question left, how do I make an symlink? Thanks for your help. |
Quote:
Quote:
man ln for more info. EDIT: Here you have my script: Code:
#!/bin/sh |
Save yourself alot of time:
apt-get install guarddog FYI, in debian all the startup scripts are located in /etc/init.d. The directories /etc/rc?.d are runlevel directories which contain symlinks to the scripts in /etc/init.d. The symlink will cause the script to start or stop depending on weather the symlink starts with an S or a K, e.g. /etc/rc3.d/S20guarddog -> ../init.d/guarddog The above symlink would cause guarddog to start when you enter runlevel 3 (/sbin/init 3.) /etc/rc0.d/K20guarddog -> ../init.d/guarddog If you do a shutdown the above symlink would cause guarddog to stop, the K stands for kill. If you have an iptables script you really want to use, go ahead and install guarddog then put your iptables script here: /etc/rc.firewall Make sure it's executable. Then guarddog will start your script instead of its own. |
Why you must use a firewall for the normal pc the firewall is unuseful try to close the service by #.
If you are sure to use the firewall in slackware you must created one file "rc.firewall" chmod 755 in /etc/rc.d/ and here u can put all rules. ByE |
An alternative using a full script is simply call
Code:
iptables-save > /path/to/save Code:
iptables-restore < /path/to/save |
Quote:
Quote:
|
I've planned to use my server as a gateway as well, and I can't do anything about it, but then you need to configure some sort of firewall.........
|
All times are GMT -5. The time now is 09:17 PM. |