LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-04-2005, 05:53 AM   #1
sarfaraz_ic
LQ Newbie
 
Registered: Nov 2004
Location: India
Distribution: Redhat 9.0
Posts: 4

Rep: Reputation: 0
NAT- Internet Sharing


Hello Everybody

I am trying to configure Internate Sharing using NAT (MASQUERADE).

I have linuc box with Red Hat 9.0 with two NIC. One NIC eth0 is connected to my ISP which dials out using PPTP (I am using RP-PPPOE-3.5 for ADSL connection)

I have other NIC eth1 connected to my HOME Network which gives out IP as Linux box works as DHCP server also.

After trying everything I am still unable to share the net connection.

Following are the iptables commands I Used....

1. iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE

2. iptables --append FORWARD --in-interface eth1 -j ACCEPT

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

all set OK. But while adding following route I am getting SIOCADDRT: Network is unreachable error.

route add -net 192.168.10.0 netmask 255.255.255.0 gw XXX.XXX.XXX.XXX dev eth1

where xxx.xxx.xxx.xxx is gateway provided by ISP.


Please help me in setting up the net sharing.

Thanks in Advance

Sarfaraz
 
Old 02-04-2005, 06:04 AM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there
i also share my internet connection but i do that using shorewall which uses IPtables
it is much easy there

also can u ping that network u want to add usig the route command

regards
 
Old 02-04-2005, 06:08 AM   #3
amosf
Senior Member
 
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672

Rep: Reputation: 46
Yep, I used shorewall as well, much easier to edit the shorewall config files - but now I use a separate smoothwall box. Even better...
 
Old 02-04-2005, 06:14 AM   #4
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
i have heard a lot about smoothwall

but i got to know that u require a different BOX for that
which i do not have now

so i dropped the idea

reagrds
 
Old 02-04-2005, 06:21 AM   #5
amosf
Senior Member
 
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672

Rep: Reputation: 46
That's right, smoothwall needs another box. But shorewall also works well... I used shorewall for about 6 months while I didn't have a router/smoothwall box...

Smoothwall doesn't need much to run on BTW. Any old pentium will do. Mine is a P166MMX with 32meg ram and a 1gig drive. Only need a cd, monitor and keyboard to install, then it runs headless.

Around here people throw away computers like that, but probably not in india...

I'd suggest shorewall to make things easier...
 
Old 02-04-2005, 06:32 AM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
yes u r right
people do no throw away computers but they donate it to schools where a small machine will do enough good!!

and shorewall is really easy and fast!!

regards
 
  


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
nat for internet connection alaios Linux - Networking 2 07-17-2005 03:21 PM
mandrake 10.1 sharing files and internet sharing xfiles_arram Linux - Networking 0 05-21-2005 03:22 PM
Internet Connection - NAT sabaum Linux - Networking 2 02-21-2005 07:00 PM
NAT sharing problems... hkl8324 Linux - Networking 6 09-03-2004 10:45 AM
File sharing and internet sharing mullet Linux - Networking 1 10-14-2003 02:30 PM


All times are GMT -5. The time now is 10:16 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration