/* HINT: Search archives @ http://www.indyramp.com/masq/ before posting!
/* ALSO: Don't quote this header. It makes you look lame :-) */
gary wrote:
> I'm new to IP Masquerade, please help on the following,
>
> I've go thr the Linux IP Masquerade HOWTO, but still can't get thr...
>
> My setup as,
> - Linux RH6.2 (Zoot), Kernel 2.2.14-5.0smp
> - create file at /etc/rc.d/rc.firewall and chmod 700 for it
ah, but what's in that file?
> ifconfig
> eth0 Link encap:Ethernet HWaddr 00:90:27:E0:20:78
> inet addr:203.127.111.82 Bcast:203.127.111.127
> Mask:255.255.255.192
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:2434 errors:0 dropped:0 overruns:0 frame:0
> TX packets:1483 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:100
> Interrupt:21 Base address:0xb000
>
> eth1 Link encap:Ethernet HWaddr 00:D0:B7:AF:7E:EE
> inet addr:10.18.0.2 Bcast:10.18.255.255 Mask:255.255.0.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:9 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:100
> Interrupt:23 Base address:0xd000
>
> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> UP LOOPBACK RUNNING MTU:3924 Metric:1
> RX packets:18 errors:0 dropped:0 overruns:0 frame:0
> TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
>
> when tried to run
> # /etc/rc.d/rc.firewall
> bash: /etc/rc.d/rc.firewall: No such file or directory
this message usually appears when the #! line at the start
of a script refers to a non-existant file. for example,
it might say #!/usr/bin/perl when perl is actually in
/usr/local/bin/perl (or /bin/bash when there's only /bin/sh).
did you run it as root?
> but when I tried to check with,
> # cat /proc/sys/net/ipv4/ip_forward (always get '0', how can I change it to
> '1')
echo 1 > /proc/sys/net/ipv4/ip_forward
> I check my "/etc/sysconfig/network"
>
> NETWORKING=yes
> HOSTNAME=thongsiek.com
> GATEWAY="203.127.111.65"
> GATEWAYDEV="eth0"
> FORWARD_IPV4="yes"
this last line should cause the startup scripts to put 1 in ip_forward.
i wonder why it doesn't.
p.s. all you should need in /etc/rc.d/rc.firewall (for masquerading) is:
#!/bin/sh
ipchains -P forward DENY
ipchains -A forward -s 10.18.0.0/16 -j MASQ
raf
_______________________________________________
Masq maillist - [EMAIL PROTECTED]
Admin requests can be handled at http://www.indyramp.com/masq-list/ --
THIS INCLUDES UNSUBSCRIBING!
or email to [EMAIL PROTECTED]
PLEASE read the HOWTO and search the archives before posting.
You can start your search at http://www.indyramp.com/masq/
Please keep general linux/unix/pc/internet questions off the list.