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 03-24-2010, 06:24 AM   #1
lukibill
LQ Newbie
 
Registered: Mar 2010
Posts: 5

Rep: Reputation: 0
[help] how another computers connect internet via linux router


i'm Linux newbie

I have a problem about routing in Linux ( cent os)

my linux machine have 2 network card :
- eth0 ( connect to internet ) ip : 172.25.1.2/24 default gateway : 172.25.1.1, dns 172.25.1.3
- eth1 ( connect to LAN computers ) ip 192.168.1.1/24
LAN computers connect to internet via Linux ( LAN computer have ip net 192.168.1.0/24 and have gateway is 192.168.1.1 )
how the LAN computer connect to internet through Linux

thanks, i'm from Vietnam, hello everybody.

Last edited by lukibill; 03-24-2010 at 06:26 AM.
 
Old 03-24-2010, 06:40 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Welcome to LQ

On the linux machine, you need to enable masquerading
see
http://tldp.org/HOWTO/IP-Masquerade-HOWTO/
http://www.google.be/search?q=linux+...ient=firefox-a

Good luck
 
1 members found this post helpful.
Old 03-24-2010, 07:21 AM   #3
lukibill
LQ Newbie
 
Registered: Mar 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Wink

Quote:
Originally Posted by repo View Post
Welcome to LQ

On the linux machine, you need to enable masquerading
see
http://tldp.org/HOWTO/IP-Masquerade-HOWTO/
http://www.google.be/search?q=linux+...ient=firefox-a

Good luck
thank repo, your reply seem useful to me. I will try it

But masquerade is a Linux machine connect direct to internet. But in my case Linux machine connect to the gateway ( the gateway connect to internet ). so masquerade can be used in my case ?

Last edited by lukibill; 03-24-2010 at 07:34 AM.
 
Old 03-24-2010, 11:04 AM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,028

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
^shouldnt matter which pc is connected to the internet:
this mite help:
http://www.linuxquestions.org/questi...ternet-774246/
 
1 members found this post helpful.
Old 03-24-2010, 11:05 AM   #5
lukibill
LQ Newbie
 
Registered: Mar 2010
Posts: 5

Original Poster
Rep: Reputation: 0
i solve this problem. I found the script solve the problem easily

here : http://www.cyberciti.biz/files/scrip...-script.sh.txt
and reference to : http://www.cyberciti.biz/faq/rhel-fe...sharing-howto/

thanks all
 
Old 03-24-2010, 11:53 AM   #6
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Quote:
But masquerade is a Linux machine connect direct to internet. But in my case Linux machine connect to the gateway ( the gateway connect to internet ). so masquerade can be used in my case ?
Yes
 
  


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
How to directly connect 2 computers - No router, no DHCP? GuyWhoKilledBear Linux - Networking 2 08-07-2009 01:41 PM
Connect to Internet through Linux Router KinnowGrower Linux - Networking 4 08-14-2008 12:28 PM
Connect 3 computers with router and crossover? Ynot Irucrem Linux - Networking 4 09-06-2007 02:16 AM
Connect multiple computers behind a broadband router timyaukey Linux - Networking 4 07-03-2004 09:44 AM
unable to connect to my linux router from internet using ssh shkkhanhyd Linux - Security 3 03-31-2004 10:44 PM


All times are GMT -5. The time now is 02:07 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