Solved

How to config my Linux machine to be my proxy etc.

Posted on 2000-04-22
5
329 Views
Last Modified: 2010-04-20
Hi,

I got a machine on which I installed RedHat 6.1, and I want it to act as a proxy server, but haven't the slightest clue as to how to do this, and I know next to nothing about UNIX/Linux.
(lol though I do know 'pico', nice little editor which is about the only thing I understand) :)
I got my network card to work, and when pinging to and from my machine all went fine, and when entering its IP address in a browser it displays the default web page... but... how can I tell it to act as a proxy server, so that I can hook up my cable modem to my Linux machine instead of to a seperate (Windoze) proxy server...
And how can I connect from a Windoze PC to my Linux machine, and the other way around, from my Linux machine to a Windoze PC (someone mentioned "smbmount" when I asked someone else before). (over a LAN beats the heck out of copying everything on floppies... specially when things get bigger in size)
Well that's about all I can think of for now....

(I know, I'm probably better off buying a book and learning about Linux) :)


And as you might have noticed, this is not the notorious CJ_S, but mgdPaul who has run out of points and needs to ask a big question :)

Thanks a whole lot in advance,


Paul
0
Comment
Question by:CJ_S
5 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 100 total points
ID: 2740898
Oh that's lots of questions all rolled up together. I'd suggest that we start by getting the inside network functioning at the TCP/IP level and then take on setting the Linux system up as an Internet gateway.

I can't tell from the question exactly what your network configuration is at present. You do need the Linux system's ethernet (NIC) connected to the windoze box's NIC, either directly by a cross-over cable or via a HUB. Both systems will need to be configured to be in one of the "private reserved" networks. A decent choice would be 192.168.0.0/24, which would mean that one system would get the IP 192.168.0.1/255.255.255.0 and the other could be 192.168.0.2/255.255.255.0. If you've got everything right each system should be able to ping the other by IP address. The winoze box will need its default gateway pointing to the inside NIC of the Linux system (192.168.0.1 perhaps) and it's nameserver entries set to that of your cable modem provider's DNS.

The next step would be to install a second NIC in the Linux system and get it talking to the cable modem (probably using DHCP). Two NIC's can require special configuration and I suggest that you read the Ethernet-HowTo to find out what to do and how to go about it. Depending on who your cable modem service is with, you may be able to get Linux "on the air" easily, or you might have problems. Setting up the outside NIC for DHCP is most easily done with linuxconf.

Once you've got both NIC's up and running, you'll need to set up IP Masquerade, and that's covered by the IPMasquerade-HowTo and the IPchains-HowTo.

All of the Howto's can be seen on-line at Redhat's site (http://www.redhat.com/mirrors/LDP/HOWTO/) and at http://howto.tucows.com/LDP/HOWTO/HOWTO-INDEX-3.html#ss3.1, as well as at a lot of other mirrors.
0
 
LVL 22

Author Comment

by:CJ_S
ID: 2742250
I'm sorry, forgot to mention that didn't I? (my network config) :)

My current Windoze proxy server's IP is 169.254.100.10 (my neighbour set all this up, but since everything's under my maintenance I can change whatever I like) :)
My Linux machine has the IP 169.254.100.90
My own PC has the IP 169.254.100.40
My neighbour's IP is 169.254.100.30
Hmmm think I threw in some useless info but oh well :)
I don't know if you need to know my network card's settings too, but I suppose not..... :)
My Linux machine is connected via a HUB to all of the other computers I mentioned... I don't know if 169.254.100.x is a 'private reserved' network, but Windoze came up with it once so we kept it :)
All systems can ping eachother, and the proxy server config as it is works, I just want to change this for several reasons :)
My cable modem is hooked up to a COM port and well.... what else can I say about it..... lol it needs "4" as phone number to dial in :)

I don't know how I can tell the Windoze machines to have its default gateway pointing to inside the NIC.... um probably cause I am confused by all the terms here :) Just means I have to tell all my machines that the internet connection is going through a proxy server, and give the IP address? (I hope so, cause that I know how to do) :)

I already hooked my cable modem up to my Linux machine once before and I got it to connect and I surfed the Internet for a while, so that already works... and since my cable modem uses a COM port I don't need a second ethernet card I hope :) (though soon I hope to be getting ADSL and I _would_ need a second ethernet card) :)

Thanks a whole lot for your answer :)

(and again this wasn't CJ_S) :)
0
 
LVL 1

Expert Comment

by:bughead1
ID: 2742846
Are you sure you really want a proxy server? Squid is a proxy server for Linux, but on a small network, it seems a waste...even a performance bottleneck.

Your Linux box can serve as a default gateway for your network and masquerade the private (non routable) IP's you assign each of the other machines.

You say you are having trouble figuring out how to setup the Windows machines to use the default gateway? Linux Network Toolkit by Paul G.Sery, published by IDG Books is getting a bit dated (comes with a copy Of RedHat 5.0) but is still useful. Most of the book is oriented toward providing Windows clients services via Linux servers. You might want to get it.

Another book worth looking at -- and FREE to download as a PDF file is the e-smith users guide at http://www.e-smith.net

The e-smith server is a RedHat distribution, tweaked and modified to almost automatically configure itself as a gateway/router, samba file and print server, web server, and mail server.

The manual, starting on page 28, details setting up Windows machines to use the default gateway router -- which is what you are trying to configure.

E-smith also acts as a proxy server if you want -- again automatically -- just point the Windows box at port 3128 on the gateway.  

The book gives you a brief rundown of the pro's and con's of using a proxy versus a direct masqueraded connection.

It is worth a read.
0
 

Expert Comment

by:mgdPaul
ID: 2742936
Thanks for the tips! :)

But yes I'm sure I want a proxy, it's not really for me but more as a service to my neighbours.... I more than noticed already that it's a performance bottleneck, but oh well I can live with it.
0
 
LVL 1

Expert Comment

by:Cook
ID: 2743203
Please follow jlevie's advice and choose a level 3 NAT rather than a level 7 Proxy. Read the ip-masquerading and ip-chains howtos' in order to config. Steps to take: install IP-masq en IP-chains packages, enable IP-forwarding, insert IP-chains-rules, config gateway and DNS on clients. Succes!
PS, don't skip the security issues in the howto's!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now