Red Hat This forum is for the discussion of Red Hat Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-08-2003, 12:08 PM
|
#1
|
LQ Newbie
Registered: Oct 2003
Location: India
Posts: 8
Rep:
|
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.
|
|
|
10-10-2003, 12:39 PM
|
#2
|
Senior Member
Registered: Feb 2003
Location: The Arctic
Distribution: Fedora, Debian, OpenSuSE and Android
Posts: 1,820
Rep:
|
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.
|
|
|
10-26-2003, 01:52 AM
|
#3
|
LQ Newbie
Registered: Oct 2003
Location: India
Posts: 8
Original Poster
Rep:
|
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.
|
|
|
10-26-2003, 01:33 AM
|
#4
|
Senior Member
Registered: Feb 2003
Location: The Arctic
Distribution: Fedora, Debian, OpenSuSE and Android
Posts: 1,820
Rep:
|
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
|
|
|
11-04-2003, 09:10 AM
|
#5
|
LQ Newbie
Registered: Oct 2003
Location: India
Posts: 8
Original Poster
Rep:
|
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.
|
|
|
11-04-2003, 12:15 PM
|
#6
|
Senior Member
Registered: Feb 2003
Location: The Arctic
Distribution: Fedora, Debian, OpenSuSE and Android
Posts: 1,820
Rep:
|
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?
|
|
|
11-05-2003, 07:11 AM
|
#7
|
LQ Newbie
Registered: Oct 2003
Location: India
Posts: 8
Original Poster
Rep:
|
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.
|
|
|
11-05-2003, 12:48 PM
|
#8
|
Senior Member
Registered: Feb 2003
Location: The Arctic
Distribution: Fedora, Debian, OpenSuSE and Android
Posts: 1,820
Rep:
|
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?
|
|
|
11-12-2003, 10:51 PM
|
#9
|
LQ Newbie
Registered: Oct 2003
Location: India
Posts: 8
Original Poster
Rep:
|
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
|
|
|
11-15-2003, 06:58 PM
|
#10
|
Member
Registered: Oct 2003
Location: Spain
Distribution: Fedora
Posts: 104
Rep:
|
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?
|
|
|
11-15-2003, 11:45 PM
|
#11
|
LQ Newbie
Registered: Oct 2003
Location: India
Posts: 8
Original Poster
Rep:
|
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?
|
|
|
11-18-2003, 01:59 PM
|
#12
|
Senior Member
Registered: Feb 2003
Location: The Arctic
Distribution: Fedora, Debian, OpenSuSE and Android
Posts: 1,820
Rep:
|
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.
|
|
|
11-18-2003, 10:04 PM
|
#13
|
LQ Newbie
Registered: Oct 2003
Location: India
Posts: 8
Original Poster
Rep:
|
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?
|
|
|
11-18-2003, 11:57 PM
|
#14
|
Senior Member
Registered: Feb 2003
Location: The Arctic
Distribution: Fedora, Debian, OpenSuSE and Android
Posts: 1,820
Rep:
|
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).
|
|
|
01-02-2009, 05:01 AM
|
#15
|
LQ Newbie
Registered: Aug 2007
Posts: 14
Rep:
|
SQUID PROBLEM IN rEDHATAS-4
Quote:
Originally Posted by Pcghost
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
|
|
|
All times are GMT -5. The time now is 05:26 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|