LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 03-16-2009, 09:23 AM   #1
altavoltagem
LQ Newbie
 
Registered: Mar 2009
Posts: 4

Rep: Reputation: 0
Ubuntu 8.10 - Squid with one nic only


Hi,

I am going to implement squid on my Ubuntu 8.10 with only one nic.
Please tell me something, On your architecture, could your client PCs connect to Internet directly, ignoring the proxy ?

My network is something like this :

Various PCs ... 192.168.10.2,192.168.10.3,192.168.10.4...
Router DI-624 (Gateway) ... 192.168.10.1

Now I would like to configure squid and every traffic to internet will be grabbed on my proxy. I would like to analyse some http stats, I read that awstats it's good.

Thanks in advance
 
Old 03-16-2009, 10:27 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Slackware 14.0
Posts: 8,464

Rep: Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877
You need to have 2 nic's in order for other clients to connect to internet via your server.
You need to install masquerading and squid on the server.
The server will be the default gw for the clients, and will act as a proxy.

router <=> server <=> clients

http://tldp.org/HOWTO/IP-Masquerade-HOWTO/
 
Old 03-16-2009, 10:48 AM   #3
altavoltagem
LQ Newbie
 
Registered: Mar 2009
Posts: 4

Original Poster
Rep: Reputation: 0
I have read that it's possible with one nic, but I don't know how.

For example, http://teladan98.wordpress.com/2007/...-with-one-nic/
 
Old 03-16-2009, 11:20 AM   #4
tizzef
Member
 
Registered: Jan 2005
Location: Nice, France
Distribution: Ubuntu,RHES, Mandriva, RHAS, AIX 4.3.3, 5.2 & 5.3, Debian,Solaris8/10
Posts: 119

Rep: Reputation: 20
Hi,

It is working like a charm at home for me.

It have only one nic and my ubuntu box run squid. I connect to the internet via squid from my laptop.

I cant see why it would not work with only one NIC.

I connect to my squid server using TCP/IP via the standart port on my ubuntu box.

Cheers
 
Old 03-16-2009, 11:38 AM   #5
ddaemonunics
Member
 
Registered: May 2008
Location: Romania
Distribution: Debian
Posts: 242

Rep: Reputation: 41
Yes you can because squid is just like any other service - receives requests and it just responds to his clients.

You only need two NICs if squid is also an internet gateway for your PC's
The "problem" is that you have to manually set the proxy setting on every client ...the proxy is application dependent and cannot be set with ..let's say dhcpd
 
Old 03-16-2009, 11:53 AM   #6
altavoltagem
LQ Newbie
 
Registered: Mar 2009
Posts: 4

Original Poster
Rep: Reputation: 0
So ...
My network is something like this :

Various PCs ... 192.168.10.2,192.168.10.3,192.168.10.4...
Router DI-624 (Gateway) ... 192.168.10.1

How could I force to use squid to have internet, instead of connecting directly to the router.

Example

Example of a client 1 (XP) ... 192.168.10.100
Example of a client 2 (VISTA) ... 192.168.10.101
Ubuntu Proxy ... 192.168.10.2
Router DI-624 (Gateway) ... 192.168.10.1

If (client 1) configure gateway as 192.168.10.1 the proxy is not forced and it will be not used.

Did you understand my issue ?
 
Old 03-16-2009, 12:39 PM   #7
ddaemonunics
Member
 
Registered: May 2008
Location: Romania
Distribution: Debian
Posts: 242

Rep: Reputation: 41
If you don't have control over the PC's then all your settings must be done on the router...and your router is for home use..don't think it can do DNAT to force client traffic redirection to your squid box

Last edited by ddaemonunics; 03-16-2009 at 12:40 PM.
 
  


Reply

Tags
networking, squid


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to redirect squid traffic to a specific nic card scream Linux - Newbie 0 03-08-2009 03:57 AM
squid on ubuntu 7.10 hunter81 Linux - Newbie 3 05-27-2008 12:06 AM
How many NIC requier for Squid mukeshrathod15 Linux - Networking 3 02-03-2007 04:07 PM
Need help with Gb NIC in Ubuntu Child of Wonder Linux - Networking 1 09-12-2006 03:25 PM
Configure 2 NIC in squid addipolli Linux - Networking 2 04-20-2006 08:45 AM


All times are GMT -5. The time now is 04:19 AM.

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