LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Internet Sharing through Lan (https://www.linuxquestions.org/questions/linux-software-2/internet-sharing-through-lan-73819/)

varunbihani 07-18-2003 08:24 AM

Internet Sharing through Lan
 
unable to configure lan settings. I have two lans card install one is for internet and one is for local area network. I am able to connect to internet but not able to share it on lan. i have redhat 9.1
Kindly help

mad_ady 07-18-2003 08:44 AM

I'd like to find out how to do that too... I guess you must configure iptables to forward packets on your lan card connected to the net (let's say its eth0) to your other card (eth1)...

But I'm not sure if you need to do anything else to have a bridged network...

varunbihani 07-18-2003 08:55 AM

i dont find iptables
 
I can not find iptables. Can u please tell me where can i find those iptables where i can forward

varunbihani 07-18-2003 09:05 AM

I am able to connect to local LAN but now am unable to bring internet on any system.
that is when i connect to my local lan my i get disconnected from internet but when is deactivate my local lan i can access to internet

angelrod 07-18-2003 09:16 AM

The easiest way to share your internet connection and to setup a firewall is with "firestarter"

http://firestarter.sourceforge.net/

mad_ady 07-18-2003 11:37 PM

You should be able to type 'iptables' in a console and see some output. Try 'whereis iptables' to find it... Once you have it, find out more with 'man iptables'

folavo 07-19-2003 12:11 PM

Red Hat 9.0 has IP Forward disabled by default.
To enable it, do:
echo 1 > /proc/sys/net/ipv4/ip_forward

Afterwards you must configure Iptables to Masquerade the forwarded packets. (Lets assume that Internet is in eth0)
(Dynamic IP)
iptables -t -nat -A POSTROUTING -o eth0 -j MASQUERADE

(Static IP)
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to static_ip

win32sux 07-20-2003 08:13 AM

you could use the shoreline firewall to share your internet connection and protect your local area network...

it's available as an rpm file... make sure you have iptables and iproute installed... you can get them at a red hat mirror like this:

ftp://mirrors.kernel.org/redhat/redh...86/RedHat/RPMS

here's the links for shorewall:

http://www.shorewall.net/download.htm

http://www.shorewall.net/Install.htm#Install_RPM

here's the guide for a two-interface setup:

http://www.shorewall.net/two-interface.htm

basically, it's just a matter of installing the rpm and then editing a few files in the /etc/shorewall/ directory before starting her up...

you might also want to use something like squid to speed things up a little for the surfers and save bandwidth:

http://www.squid-cache.org/

MooktaKiNG 07-20-2003 08:47 AM

I use shorewall on my router. Its great becuase it doesn't have a GUI, becuase normally i use ssh to configure my router. Or if it had a webbased configuration tool then it would be even better, I think there's a webmin module. not sure.

But editing couple of simple files in shorewall is hell lot better then making a full blown bash scripts using iptables :D:D


All times are GMT -5. The time now is 12:55 AM.