LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to connect two private network in redhat?for example 10.0.0.0 and 192.168.0.0? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-connect-two-private-network-in-redhat-for-example-10-0-0-0-and-192-168-0-0-a-941385/)

alwaysonline007 04-23-2012 10:07 PM

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:)

kbp 04-23-2012 11:03 PM

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 ?

alwaysonline007 04-24-2012 01:29 AM

Yes,you got my point correctly kbp,so how to do that?

jschiwal 04-24-2012 02:19 AM

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.

pan64 04-24-2012 02:27 AM

do you want to use this RH linux as a gateway between the two networks without router? You will need two network cards.

alwaysonline007 04-24-2012 11:12 AM

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..:)

jschiwal 04-24-2012 06:50 PM

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.

alwaysonline007 04-24-2012 11:45 PM

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?

pan64 04-25-2012 02:54 AM

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?

kbp 04-25-2012 05:57 AM

Quote:

comparing apples and strudel.
... fkn hilarious :)

alwaysonline007 05-16-2012 10:28 PM

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:):p


All times are GMT -5. The time now is 11:44 PM.