LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 08-06-2013, 10:24 PM   #1
randdeveloper
Member
 
Registered: Jun 2013
Distribution: linux mint xfce
Posts: 42

Rep: Reputation: Disabled
configure proxy server with private internal network single NIC


I'm trying to set up a private internal network of Linux/windows/android connected to a wireless router separated from the Internet by a proxy server. I have an old computer running Linux mint and I have a switch as well as the router provided by my ISP. How can I set up Linux to be a proxy through which all of my internal computers must pass in order to connect to the internet and allow me to access my internal network from the outside.
The ISP router is ATT which has instructions for port forwarding. The Linux Mint proxy only has one NIC which is why I thought I could connect that to the switch and connect both routers to the switch making that one network, use my second Linksys router for my internal network wired and wireless, and leave my ATT router to provide guest access to the internet.
On the Linux mint proxy I want to run Apache to serve web pages, Squid for proxy for my private network, and also allow SSH or other remote desktop from the internet through the ATT router through the Linux mint proxy then into my internal network.
Here's the setup with the internal networks shown for each router:

internet - ATT router --- switch ---- Linksys router - internal network
...........(192.168.1.) | (10.12.80.)
........................proxy server

Alternatively I could not use the switch and go:

internet - ATT router --------- Linksys router - internal network
...........(192.168.1.) | (10.12.80.)
.............................proxy server {also on the 10.12.80. internal network}

To give more details on the setup the Linksys router uses DHCP on the 10.12.80.0/25 internal network to connect windows 8, windows 7, Linux mint development machine, and a couple of phones and tablets all android. The other side of the Linksys I now have set up on a port on the ATT router as part of the 192.168.2.0/24 network. The Linksys router is the gateway for the computers and the ATT router is the gateway for the Linksys router. I also have one other windows 7 computer connected directly to the ATT router. I have the switch and the Linux computer I want to make into a proxy and thought it would work best connecting the ATT router to the switch, the Linux mint proxy to the switch, and the Linksys router to the switch to enable the computer to sit between the internal network and the ATT router.

How do I setup Linux and squid plus apache plus SSHserver on my proxy server to handle all traffic between the internal network and the ATT router and outside world? Do I need the switch or can I achieve the same separation connecting the proxy server to the Linksys router say by giving it a static ip and letting that ip be the gateway for the Linksys router?

I'm very new to Linux and to networking. I've read a few books, watched some very helpful videos online, and read a bunch of websites to learn how to set up a network, etc. but I just can't understand how to accomplish this task and would appreciate any help.
 
Old 08-07-2013, 02:17 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
You can use route policy to create two separate routing table to control internal and external network. The key point use source route.
 
Old 08-07-2013, 02:26 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Some of the firewall's and security software apps out there run on one ip (well almost all can) but usually folks put in a dual IP in their nic. May be only for convenience. It will still be kind of slow on high demand stuff. Set proxy to the second ip address on the proxy for either your browser or just make it global for the OS.

Last edited by jefro; 08-07-2013 at 04:21 PM.
 
Old 08-07-2013, 06:49 PM   #4
randdeveloper
Member
 
Registered: Jun 2013
Distribution: linux mint xfce
Posts: 42

Original Poster
Rep: Reputation: Disabled
Thanks nini09 and jefro
I can set up two ip addresses for the NIC using eth0 and eth0:1 in my configuration files. In doing that, isn't the only routing I need to set up to be from the internal network's router to the proxy server and then let the proxy server use the other ip address to communicate with the ATT router? In other words, they'll effectively be two NICs and the internal Linksys router can just pass all of its traffic to one of those NICs while the other can communicate with the external router.

Thanks, again, for your help.
 
Old 08-08-2013, 03:47 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
That is what you'd want. "In other words, they'll effectively be two NICs and the internal Linksys router can just pass all of its traffic to one of those NICs while the other can communicate with the external router." May have to watch loads or speeds, if too low might need to do stuff like offload checksum or even get new nic or faster system.

Last edited by jefro; 08-08-2013 at 03:48 PM.
 
  


Reply



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
Transparent proxy, 2 NICs, forward to internal proxy server Alcyone Linux - Networking 6 05-14-2013 07:15 PM
squid proxy with single NIC but two gateways KinnowGrower Linux - Networking 3 11-29-2012 11:30 AM
Howto Configure a Private Proxy? Thewyzewun Linux - Networking 3 11-30-2007 04:28 PM
Single NIC of Reverse Proxy Natterjack Toad Linux - Networking 0 10-28-2004 03:08 AM
how to configure firewall on single nic RajaRC Linux - Networking 3 10-15-2004 06:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:11 AM.

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
Open Source Consulting | Domain Registration