Click to See Complete Forum and Search --> : IPCHAINS question (it works...but)


Nailz
10-09-2000, 10:32 AM
Quick Question re: IPCHAINS.

I'm running RH6.2. I have 2 pc's (the second is running Win98/Win2000/NT4 depending on what I'm working on). NIC 1 (eth0) on the Linux box is DHCP (to my cable modem), NIC 2 (eth1) is set at 192.168.0.1. The Win box is 192.168.0.2 with .1 as the gateway.

I have a basic script that should enable IP forwarding:

ipchains -P forward DENY
ipchains -A forward -s 192.168.0.1/255.255.255.0 -j MASQ
echo 1 > /proc/sys/net/ipv4/ip_forward

I can run each of these lines separately from the command line, however if I make the script executable (chmod +x filename), then I get the following error messages:

Try 'ipchains -h' or 'ipchains --help' for more info.
Try 'ipchains -h' or 'ipchains --help' for more info.
:No such file or directory4/ip_forward

Again, I can run each command separately without problem.

------------------
Bow down before the one you serve
You're gonna get what you deserve...
- Nine Inch Nails

dharmabum
10-09-2000, 02:36 PM
Do you have FORWARD_IPV4=true in /etc/sysconfig/network?

Nailz
10-09-2000, 03:49 PM
I have:

FORWARD_IPV4="yes"

Bane
10-09-2000, 07:10 PM
Probable won't work, but...
try putting the echo command first.

guitarlyn
10-09-2000, 07:16 PM
The ipchains game is always fun, but unless you really understand what you are doing, I have a real simple solution. Download 'PMFirewall' from http://www.pointman.org , install it, and in about 5 minutes you will have a stealth firewall without all the frustration.
Hope this helps,

------------------
~Guitarlynn

Nailz
10-09-2000, 10:48 PM
Guitarlyn -
That doesn't quite answer my question re: why it's not working ... BUT...

THANK YOU. Very nice program. PMFIREWALL works like a charm.

------------------
i'm the one without a soul
i'm the one with this big f$&*#(@ hole
- Nine Inch Nails