LinuxQuestions.org
Register a domain and help support LQ
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 04-23-2012, 10:07 PM   #1
alwaysonline007
LQ Newbie
 
Registered: Apr 2012
Posts: 5

Rep: Reputation: Disabled
How to connect two private network in redhat?for example 10.0.0.0 and 192.168.0.0?


Can i use squid?how to edit its configuration file for make them connect to eachother?i don't want to use router to connect them

Last edited by alwaysonline007; 04-23-2012 at 10:09 PM.
 
Old 04-23-2012, 11:03 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644
The only way to allow traffic to flow between 2 networks is routing, did you mean that you don't want to use a routing device and want to use a computer ?
 
Old 04-24-2012, 01:29 AM   #3
alwaysonline007
LQ Newbie
 
Registered: Apr 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Yes,you got my point correctly kbp,so how to do that?
 
Old 04-24-2012, 02:19 AM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Simply enable forwarding, and configure your routes. Use the IP addresses for your respective interfaces as the gateway for that route on other hosts on the network.

Your distro may have a check box for forwarding in the network setup gui dialog. If not, look at the blog post:
http://www.ducea.com/2006/08/01/how-...ding-in-linux/

Also look at the route command or ip command for setting routes. You should indicate which Linux distro you have.
RPM based distro's have files in /etc/sysconfig/ you can edit. Debian based distros have a file in /etc/ that configures the network.
 
1 members found this post helpful.
Old 04-24-2012, 02:27 AM   #5
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,167

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
do you want to use this RH linux as a gateway between the two networks without router? You will need two network cards.
 
Old 04-24-2012, 11:12 AM   #6
alwaysonline007
LQ Newbie
 
Registered: Apr 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Yes,i configure two lan cards pan ,i will check your link and let u know that how to enable forwarding jschiwal but i was wondering if only using squid should do all that na..
 
Old 04-24-2012, 06:50 PM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Squid is a proxy server, not a router. If you configure squid as a reverse proxy to cache web traffic, its IP address would be used to access web sites instead of the gateway. You may need to enable forwarding so that both networks can reach your proxy server address, or listen on both interfaces. In either case, you will have routes configured anyway. A squid server would be in addition to routing. The router works on the IP layer. A squid server works at the application layer. So you are comparing apples and strudel.
 
Old 04-24-2012, 11:45 PM   #8
alwaysonline007
LQ Newbie
 
Registered: Apr 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thank you for clearing my confusion jschiwal,i enabled forwarding on pc where squid is also installed but still two network can't ping eachother,so do i have to enable forwarding on other two network pc also?
 
Old 04-25-2012, 02:54 AM   #9
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,167

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
there are several possibilities, like nat, port forwarding or simple routing.
As far as I see you have two network card, one is configured in 10.0.0.0, the other is 192.168.0.0.
This host has 2 ip adresses (both NIC have one).
in 10.0.0.0 you need to configure a gateway to 192,168.0.0. This will be your RH (the 10.0.* NIC) and this host will route the requests to the other NIC. I do not know if you have DHCP, DNS or other related softwares installed. Also do you have internet access also, or other communications?
 
Old 04-25-2012, 05:57 AM   #10
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644
Quote:
comparing apples and strudel.
... fkn hilarious
 
Old 05-16-2012, 10:28 PM   #11
alwaysonline007
LQ Newbie
 
Registered: Apr 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi,friends,i was busy for awhile,so i forgot to post it that i solved routing,for that we just have to select two nic from masquarding in firewall.thats it.thanx all for support
 
  


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
my server can't ping other boxes on private network (192.168.0.0) bweaver Linux - Networking 5 07-28-2011 04:20 PM
[root@wlxxb ~]# telnet 192.168.192.12 25 Trying 192.168.192.12... telnet problem cnhawk386 Linux - Networking 1 10-10-2007 03:50 PM
What route to access daisy chained 2d router 192.168.1.1 after 192.168.0.1 (subnets?) Emmanuel_uk Linux - Networking 6 05-05-2006 02:47 AM
Is someone on my network?! ::ffff:192.168.0.10:ssh ::ffff:192.168.0.:38201 ESTABLISHE ming0 Linux - Security 4 04-12-2005 02:04 AM
192.168.2.1 network with 192.168.0.1? Micro420 Linux - Networking 2 02-27-2005 07:59 AM


All times are GMT -5. The time now is 01:12 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration