Click to See Complete Forum and Search --> : Need help with Forwarding...


silkk
08-15-2002, 08:22 PM
Hey,

I have my LAN set up like this 1 GATEWALL FIREWALL machine running Linux 7.2 kernel 2.4.18 and IPTABLES 1.2.6a with 2 NETWORKCARDS ETH0 for the internet and ETH1 for my LAN with windows 2000 machines behind it. I can PING all my computers and can ACCESS the internet with my FIREWALL machine.. but i CANNOT access the internet with my WINDOWS machine..I have no RULES in my IPTABLES can someone give me a few rules that will forward request from my LAN soo ican reach the internet with my WINDOWS machine THANKS Im on a ADSL connection to the internet.

(starting from t begining for a newbie)
like
# !/bin/bash

iptables blah bah

THANKS

baldguy
08-15-2002, 08:44 PM
echo 1 > /proc/sys/net/ipv4/ip_forward

silkk
08-15-2002, 08:50 PM
Soo this is what im going to do tellme if this sounds like it will work THANKS...

crate the script in the SCRIPT it will look like this

# !/bin/bash

echo 1 > /proc/sys/net/ipv4/ip_forward


----------------------------------------------------------------------
chown root.root /etc/rc.d/rc.firewall
chmod u=rwx /etc/rc.d/firewall
sh /etc/rc.d.rd.firewall
sh /etc/rc.d/rc.firewall
/etc/init.d/iptables save

baldguy
08-15-2002, 08:53 PM
you should be able to edit /etc/sysctl.conf
and add the line:
net/ipv4/ip_forward=1
if you want it to start at system startup

silkk
08-15-2002, 09:10 PM
Yah i already edited that file, but still no luck... what else can i try???

baldguy
08-15-2002, 09:16 PM
Sorry, I didn't notice you had no rules, add this to your firewall script, changing eth0 to your external interface
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

silkk
08-15-2002, 09:38 PM
THANKS for your help BALDGUY it worked... ok now when i retsrat it gives me this

FLushing all current rules ... OK
Clearing all current rules ..... Ok

iptables: libiptc/libip4tc.C:384 do_check Assertion 'h--->info.valid_hooks == (1 <<0 | 1 << 3)' Failed
/etc/rc3.d/s08 iptables:line -248 280 ABORTED iptables -t $i -F

iptables: libiptc/libip4tc.C:384 do_check Assertion 'h--->info.valid_hooks == (1 <<0 | 1 << 3)' Failed
/etc/rc3.d/s08 iptables:line -245 284 ABORTED iptables -t $i -X


iptables: libiptc/libip4tc.C:384 do_check Assertion 'h--->info.valid_hooks == (1 <<0 | 1 << 3)' Failed
/etc/rc3.d/s08 iptables:line -241 288 ABORTED iptables -t $i -Z

APPLYING firewalls Rules OK
----------------------------------------------------------------------------------
Im not sure what all this means and how can i fix it...ANYHELP