LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-18-2003, 09:24 AM   #1
varunbihani
Member
 
Registered: Jul 2003
Location: indore, india
Posts: 69

Rep: Reputation: 15
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
 
Old 07-18-2003, 09:44 AM   #2
mad_ady
Member
 
Registered: Jan 2003
Location: I'm all in your mind!
Distribution: Debian
Posts: 248

Rep: Reputation: 30
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...
 
Old 07-18-2003, 09:55 AM   #3
varunbihani
Member
 
Registered: Jul 2003
Location: indore, india
Posts: 69

Original Poster
Rep: Reputation: 15
i dont find iptables

I can not find iptables. Can u please tell me where can i find those iptables where i can forward
 
Old 07-18-2003, 10:05 AM   #4
varunbihani
Member
 
Registered: Jul 2003
Location: indore, india
Posts: 69

Original Poster
Rep: Reputation: 15
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
 
Old 07-18-2003, 10:16 AM   #5
angelrod
Member
 
Registered: Oct 2002
Location: Mexico
Distribution: RedHat 9.0 and SuSE 8.1
Posts: 229

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

http://firestarter.sourceforge.net/
 
Old 07-19-2003, 12:37 AM   #6
mad_ady
Member
 
Registered: Jan 2003
Location: I'm all in your mind!
Distribution: Debian
Posts: 248

Rep: Reputation: 30
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'
 
Old 07-19-2003, 01:11 PM   #7
folavo
LQ Newbie
 
Registered: Jul 2003
Location: Lisbon, Portugal
Distribution: Red Hat 9.0
Posts: 16

Rep: Reputation: 0
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
 
Old 07-20-2003, 09:13 AM   #8
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
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/
 
Old 07-20-2003, 09:47 AM   #9
MooktaKiNG
Member
 
Registered: Feb 2003
Location: London, UK
Distribution: Gentoo/Debian
Posts: 39

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet sharing with one lan adapter mlin Linux - Networking 5 05-07-2009 03:10 AM
Need help setting up a LAN with internet connection sharing oxicottin Linux - Networking 5 02-21-2006 07:26 AM
sharing internet over home lan! 94gsr Linux - Networking 13 05-04-2004 04:10 AM
Setting up Lan IP and Internet Connection Sharing Nukem Libranet 4 04-09-2004 10:13 AM
sharing internet connection on a LAN masand Linux - Networking 1 07-25-2003 04:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration