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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-04-2005, 04:53 AM
|
#1
|
LQ Newbie
Registered: Nov 2004
Location: India
Distribution: Redhat 9.0
Posts: 4
Rep:
|
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
|
|
|
02-04-2005, 05:04 AM
|
#2
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
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
|
|
|
02-04-2005, 05:08 AM
|
#3
|
Senior Member
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672
Rep:
|
Yep, I used shorewall as well, much easier to edit the shorewall config files - but now I use a separate smoothwall box. Even better...
|
|
|
02-04-2005, 05:14 AM
|
#4
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
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
|
|
|
02-04-2005, 05:21 AM
|
#5
|
Senior Member
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672
Rep:
|
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...
|
|
|
02-04-2005, 05:32 AM
|
#6
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 05:02 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|