LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 10-08-2003, 12:08 PM   #1
latencywala
LQ Newbie
 
Registered: Oct 2003
Location: India
Posts: 8

Rep: Reputation: 0
Question How to Configure two NICs to set setup Squid proxy on RH linux 8.0


I want to configure two NICs to setup Squid proxy on Red hat linux 8.0 machine. System detects two NICs 1)Compex's RL100-ATX 10/100 [winbond840] and 2) Dlink's RTL \8139 Ethernet [8139too]. How to set private and public IP addresses for them, so as to configure them for Squid Proxy. I tried but failed to 'ping' to Gateway's IP addr of 'My' Public IP Address. What changes I need to do in my squid.conf file.
Please help.
 
Old 10-10-2003, 12:39 PM   #2
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Real Washington
Distribution: Ubuntu, Debian, SuSE, UnSlung, Android
Posts: 1,819

Rep: Reputation: 46
Your NIC's are configured by editing the files called /etc/sysconfig/network-scripts/ifcfg-eth0 (and eth1 and so forth). Fill in the info in each corresponding file for each nic, restart networking, and you should be set. Take it one step at a time. 1st get networking setup, then work on configuring the proxy.
 
Old 10-26-2003, 01:52 AM   #3
latencywala
LQ Newbie
 
Registered: Oct 2003
Location: India
Posts: 8

Original Poster
Rep: Reputation: 0
I have already done it. But i could not reach to my Gateway (164.x.x.225). I am not able to reach it through 'ping'. What could be the problem? Ping to my eth0 and eth1 is successful. But can not go further.
Please help.
 
Old 10-26-2003, 01:33 AM   #4
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Real Washington
Distribution: Ubuntu, Debian, SuSE, UnSlung, Android
Posts: 1,819

Rep: Reputation: 46
At a console type the following

route add default gw <ip of gateway>

replace <ip of gateway> with 192.168.0.1 or whatever your gateway ip is. And don't forget to set your DNS server settings in /etc/resolve.conf
 
Old 11-04-2003, 09:10 AM   #5
latencywala
LQ Newbie
 
Registered: Oct 2003
Location: India
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks for your reply.
Due to medical reasons I could not get chance to act accordingly.
I fine now.

I entered the command: # route add....
But it replied command not found. Then i switched to sbin directory i run the coomand: #./rote add....
But it replied as:
SIOCADDRT:File exists.
Why this message?


Also I could not locate /etc/resolve.conf file. It is not present. Why? How to create this and what are its contents?

Awaiting early reply.
Thanks.
 
Old 11-04-2003, 12:15 PM   #6
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Real Washington
Distribution: Ubuntu, Debian, SuSE, UnSlung, Android
Posts: 1,819

Rep: Reputation: 46
The file is called resolv.conf with no "e". It normally will give the message "file exists" after a route add default gw command, to tell you that it indeed does exist.

So after that you still cannot connect?
 
Old 11-05-2003, 07:11 AM   #7
latencywala
LQ Newbie
 
Registered: Oct 2003
Location: India
Posts: 8

Original Poster
Rep: Reputation: 0
Found resolv.conf.
It contains the two entries for the nameserver-primary and secondary.

No. Cannot connect. (ping to gateway is unsuccessful).
What about proxy? Any modifications to squid.conf required?
I have added the tcp_outgoing_address to ip of ethx.

How to make sure gateway is accessible. It it 'ping' only ?
Thanks.
 
Old 11-05-2003, 12:48 PM   #8
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Real Washington
Distribution: Ubuntu, Debian, SuSE, UnSlung, Android
Posts: 1,819

Rep: Reputation: 46
The key rule to remember is; if the linux box can connect, so can squid. First get the connection problems figured out, then squid setup will be a breeze.
Ping to gateway doesn't reply? Can you ping anything on that interface with a reply? If not edit the settings in the
/etc/sysconfig/ifcfg-ethx file (replace x with the corresponding number). What does that file look like?
 
Old 11-12-2003, 10:51 PM   #9
latencywala
LQ Newbie
 
Registered: Oct 2003
Location: India
Posts: 8

Original Poster
Rep: Reputation: 0
These are my two files. I dont know whether both interfaces should gave the same gateway address or not.
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=210.212.185.165
NETMASK=255.255.255.0
GATEWAY=210.212.185.161
TYPE=Ethernet
USERCTL=no
PEERDNS=no
NETWORK=210.212.185.0
BROADCAST=210.212.185.255
HWADDR=00:80:48:d8:0b:f1
~

USERCTL=no
PEERDNS=no
GATEWAY=' '
TYPE=Ethernet
DEVICE=eth1
HWADDR=00:50:ba:34:16:e5
BOOTPROTO=none
NETMASK=255.0.0.0
ONBOOT=yes
IPADDR=10.0.0.111
NETWORK=10.0.0.0
BROADCAST=10.255.255.255
 
Old 11-15-2003, 06:58 PM   #10
ilpadrino
Member
 
Registered: Oct 2003
Location: Spain
Distribution: Fedora
Posts: 104

Rep: Reputation: 15
OK, first of all what do you want to do with 2 NIC?. I suppose that if you want to use squid is because your linux system is going to be a proxy server to other computers you have. On this way the first ethernet card is going to be connected to a modem or router and the second one to the others computers (through a hub or directly).

In this case, your ISP must give you some data, like if you have the same IP all times or your IP is going to be new assigned every time you connect (DHCP server). So first thing you have to do is to configure the first ethernet card with these data. You can do this executing "netcfg" in the shell. Then you can specify if it is going to be assigned by a DHCP server or you can specify your IP, your netmask and your gateway.

OK, before doing anything else, letīs go to confirm that your first ethernet card (eth0) is properly running, so execute "ifconfig" and you can see the right parameters that you have configured before. Then execute "ping xx.xx.xx.xx" where xx.... is the gateway IP.

The second card (eth1) must be configured in the same range of IPīs that your first card. This means that your netmask must allow you to reach the gateway. But before continuing, could you explian which is your idea of using two NIcīs and a proxy server?
 
Old 11-15-2003, 11:45 PM   #11
latencywala
LQ Newbie
 
Registered: Oct 2003
Location: India
Posts: 8

Original Poster
Rep: Reputation: 0
Does it mean that only one NIC is sufficient for configuring linux box as a proxy server in a LAN.
Two LANs are connected via a hub. My present proxy server is in another LAN(another lab). I want my LAN connected thr' my proxy so that network traffic on the other proxy and LAN will be reduced/diverted. I got seperate public IP from ISP for the same. Can I use the same gateway that is used by current proxy?
 
Old 11-18-2003, 01:59 PM   #12
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Real Washington
Distribution: Ubuntu, Debian, SuSE, UnSlung, Android
Posts: 1,819

Rep: Reputation: 46
You can probably get away with one NIC. Just set the gateway on the proxy and point the clients at the proxy machines ip address and it should work. I run the Privoxy proxy server on my laptop for the localhost and I just set mozilla to use localhost:8118 as its proxy.

Having two NICs allows you to prevent someone from going around the proxy by entering the gateway address.
 
Old 11-18-2003, 10:04 PM   #13
latencywala
LQ Newbie
 
Registered: Oct 2003
Location: India
Posts: 8

Original Poster
Rep: Reputation: 0
Well, setting up of proxy is my next goal. At present I am unable to ping to my gatway ip and hence network connection for the same is not up. Ping to both interfaces is successful. Already I have given ifcfg-ethx files. Are they correct? Both interfaces should use same gateway ip or one of them is not
required gateway?
 
Old 11-18-2003, 11:57 PM   #14
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Real Washington
Distribution: Ubuntu, Debian, SuSE, UnSlung, Android
Posts: 1,819

Rep: Reputation: 46
Make the settings for eth0 match the network settings of the gateway machine. Set the gateway for the gateway machines ip. Then give eth1 its own subnet, like 192.168.5.1, or whatever the existing network (with the clients) is using. If the gateway resides on the internal network (and you won't be connecting them directly) then simply set eth0 with settings matching the internal network, and of course set the gateway. You only need two nics if you are running two networks (LAN and one to connect to cable modem or ppp0 for dial-up modem).
 
Old 01-02-2009, 05:01 AM   #15
tman07
LQ Newbie
 
Registered: Aug 2007
Posts: 14

Rep: Reputation: 0
SQUID PROBLEM IN rEDHATAS-4

Quote:
Originally Posted by Pcghost View Post
The key rule to remember is; if the linux box can connect, so can squid. First get the connection problems figured out, then squid setup will be a breeze.
Ping to gateway doesn't reply? Can you ping anything on that interface with a reply? If not edit the settings in the
/etc/sysconfig/ifcfg-ethx file (replace x with the corresponding number). What does that file look like?
hELLO PCGHost

Happy New year

how r u ?? i am getting the same problem as said earlier in linuxas-4 .
i tried to search the file /etc/sysconfig/ifcfg-ethx . but i didn't find . is it avilable in Linux AS_4
please help me
thanks in advance
 
  


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
configure squid proxy with microsoft proxy as a parent proxy nintykola Linux - Software 1 08-28-2007 01:38 AM
proxy server setup, 2 NICs in same PC gjhicks Linux - Networking 4 04-06-2005 06:38 AM
Has anyone set up a transparent proxy with Squid 3.0 yet? Problems.. Pcghost Linux - Networking 0 10-23-2004 02:31 PM
How can i configure squid for a proxy in FC2 Mesopotamic Linux - Newbie 2 09-23-2004 06:36 PM
2 nics and a squid proxy mssucks Linux - Networking 4 03-06-2002 04:29 AM


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

Main Menu
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