LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I set up IPTables? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-set-up-iptables-94433/)

poshphil 09-19-2003 03:51 AM

How do I set up IPTables?
 
Hi,


I've been following the IP Masquerade HOWTO, which I can't link to yet because i havent made enough posts, but it's easily found I would guess.

anyway I've got as far as section 3.4.1. I have put that script in in the way specified, however I get errors when it runs:

Quote:

Loading simple rc.firewall version 0.74..

External Interface: eth0
Internal Interface: eth1
loading modules: - Verifying that all kernel modules are ok
----------------------------------------------------------------------
ip_tables, ip_conntrack, ip_conntrack_ftp, ip_conntrack_irc, iptable_nat, ip_nat
_ftp, ----------------------------------------------------------------------
Done loading modules.

Enabling forwarding..
Enabling DynamicAddr..
Clearing any existing rules and setting default policy..
/etc/rc.d/rc.firewall-2.4: line 272: /usr/local/sbin/iptables: No such file or d
irectory
/etc/rc.d/rc.firewall-2.4: line 273: /usr/local/sbin/iptables: No such file or d
irectory
/etc/rc.d/rc.firewall-2.4: line 274: /usr/local/sbin/iptables: No such file or d
irectory
/etc/rc.d/rc.firewall-2.4: line 275: /usr/local/sbin/iptables: No such file or d
irectory
/etc/rc.d/rc.firewall-2.4: line 276: /usr/local/sbin/iptables: No such file or d
irectory
/etc/rc.d/rc.firewall-2.4: line 277: /usr/local/sbin/iptables: No such file or d
irectory
/etc/rc.d/rc.firewall-2.4: line 278: /usr/local/sbin/iptables: No such file or d
irectory
FWD: Allow all connections OUT and only existing and related ones IN
/etc/rc.d/rc.firewall-2.4: line 281: /usr/local/sbin/iptables: No such file or d
irectory
/etc/rc.d/rc.firewall-2.4: line 282: /usr/local/sbin/iptables: No such file or d
irectory
/etc/rc.d/rc.firewall-2.4: line 283: /usr/local/sbin/iptables: No such file or d
irectory
Enabling SNAT (MASQUERADE) functionality on eth0
/etc/rc.d/rc.firewall-2.4: line 286: /usr/local/sbin/iptables: No such file or d
irectory

Done.

My guess is that IPTables isn't actually installed properly or not configured right or something, can anyone shed any light?

footfrisbee 09-19-2003 05:02 AM

Try

# which iptables

If that shows up blank, then you have to find it on the net (apt-get or rpmfind.net). If it doesn't, then correct the variable IPTABLES in your script above to reflect not /usr/local/sbin/iptables but the output of the above command.

poshphil 09-19-2003 05:26 AM

Quote:

Originally posted by footfrisbee
Try

# which iptables

If that shows up blank, then you have to find it on the net (apt-get or rpmfind.net). If it doesn't, then correct the variable IPTABLES in your script above to reflect not /usr/local/sbin/iptables but the output of the above command.


doh, yes, should have spotted that one :rolleyes:


Ok that's great thank you very much :D


All times are GMT -5. The time now is 09:12 PM.