LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   [help] how another computers connect internet via linux router (https://www.linuxquestions.org/questions/linux-newbie-8/%5Bhelp%5D-how-another-computers-connect-internet-via-linux-router-797508/)

lukibill 03-24-2010 05:24 AM

[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.

repo 03-24-2010 05:40 AM

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

lukibill 03-24-2010 06:21 AM

Quote:

Originally Posted by repo (Post 3910207)
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 ?

schneidz 03-24-2010 10:04 AM

^shouldnt matter which pc is connected to the internet:
this mite help:
http://www.linuxquestions.org/questi...ternet-774246/

lukibill 03-24-2010 10:05 AM

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

repo 03-24-2010 10:53 AM

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


All times are GMT -5. The time now is 03:01 PM.