[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Network routing question



Hans <hansfong@zonnet.nl> writes:

> Some advice needed, before I mess up big time.
> 
> At home I have a small
> network with three machines: 192.168.1.1 till 192.168.1.3
> 
> I want to take
> 192.168.1.2 to school and hook it up to the network there to do a dist
> upgrade (at home I have dial-up only, school's free bandwidth). They have a
> proxy/firewall with IP 192.168.1.1, but the bad news is all ports are
> closed, except port 902 for http access to the net. Using Netscape I can
> configure a proxy server within the program and this works. I can also set
> up my apt-sources with an http site instead of ftp, so no problem there.
> But then...
> 
> The routing part scares me:
> At school I want to do $route add
> default gw 192.168.1.1:902 eth0 so that all packet requests are put on
> through the proxy/firewall.
> 
> Q1: Is the right approach and can I specify a
> default port number like this?
> 

No, you can't route Packets throu the proxy, thats what makes the
difference between a proxy (working on application layer) and a router
(on IP layer). 
The solution is to tell the applications (each one you need) to use
the proxy. For apt-get that means to set the environment variable
"http_proxy" 

bash$ export http_proxy=http://192.168.1.1:902

or to set the proxy in apts configuration file (see apt.conf(5) ).

> Now back at home I have to put the machine
> back in my own network.
> 
> Q2: If I create a new default route ($route add
> default gw 192.168.1.0 eth0) will this suffice to get my machine back into
> my network and erase the old default route?
> 
> Or am I on the wrong track
> completely? The things that confuse me are the odd port number for http and
> the fact that both my home network and school network have the same group
> of network addresses for localnet. Anybody some kind words of
> explanation?
> 
> Hans
> 

Ramin



Reply to: