Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a home LAN cannect to the internet via an ADSL connection. My lan consists of two computers(let's pcA and pcB) and an ADSL router.

here's the IPs

router 192.168.1.1
pcA 192.168.1.2
pcB 192.168.1.4
I have a proxy server listening on pcB:80..

of course both computer use the router's IP as the default gateway. Now i reconfigured pcA to use pcB as his default gateway(due to a need) but it is not working when I request a web page with my browser!!

can anyone tell me why?

Thank you very much in advance

share|improve this question

migrated from serverfault.com Jul 17 '11 at 9:43

This question came from our site for professional system and network administrators.

    
This is all a little fuzzy. Where is the web page located? Do you have DNS set up? And why did you change the default gateway? –  wolfgangsz Jul 11 '11 at 15:48
    
What OS/distro are you using? –  ghm1014 Jul 11 '11 at 15:54

1 Answer 1

A Default Gateway is used when a system does not know what the next hop is for a particular TCP/IP packet. In other words, your computer maintains a list of routes it needs to move packets around its attached networks. If a packet is generated that needs to go to a network that your computer doesn't know about, it sends that packet to the default gateway which should know where to send it.

A Proxy Server is entirely different from a Default Gateway, though to the end user it appears as though they provide similar functionality. The proxy server accepts connections on behalf of a third party host, and forwards those connections as if it came from the proxy server itself. A proxy server is often used within a network when end user computers do not have access directly to the external Internet.

If you want to use pcB as a router for pcA, you'll need to configure some sort of routing service on pcB. In most cases this is not configured by default. However, what I think you want to do is proxy the connections from pcA through pcB to your Internet connection. Most likely, you will need to configure the proxy server within your web browser's preferences screen, or perhaps system-wide through an operating system configuration directive. Internet Explorer's configuration is particularly easy, but you must know what type of proxy server you've set up, as well as the TCP port your proxy server on pcB is listening on.

Without additional information about your particular platform, it is difficult to give any more detail.

share|improve this answer
    
Technically a default gateway is used when a host does know where the next hop is: i.e. it knows that the destination is not local and therefore sends the data to it's default gateway, which is the next (or first) hop. It's not possible for a host to not know where to send data. It knows that the data is either destined for a local host or it's not, in which case it sends it to it's default gateway. If the host didn't know where to send data it wouldn't send data. –  joeqwerty Jul 11 '11 at 16:15
    
@CWAWAK, I think you perfectly understood my point.. I want to use pcB to proxy my connection, I tried to configure my browser to use pcB as a proxy on port 80 ( because my proxy is listening on port 80) and it worked perfectly..but now I want to know why this proxy when getting my request cannot just serve it as it is a default gateway –  user29565 Jul 11 '11 at 16:28
    
@Ala: What proxy server/software are you using on pcB? –  joeqwerty Jul 11 '11 at 16:35
    
It is Squid proxy server –  user29565 Jul 11 '11 at 16:39
2  
@Ala ABUDEEB: The problem you're having is one of understanding the difference between a proxy and a gateway. Please read the two Wikipedia articles I posted. You'll see that they are entirely different beasts. –  cwawak Jul 11 '11 at 17:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.