0

Network Setup

The issue:

  • The website will only serve content to Computer C
  • Computer A needs to access the website.
  • Computer A cannot see Computer C and visa-versa
  • Computer B cannot see Computer A and Computer C
  • However Computer A and Computer C can see Computer B

The question:

Is it possible for Computer A to see the websites content using Computer B as a middle man and routing traffic?

What I'm thinking so far:

Both Computer A and Computer C make a VPN connection to Computer B so all computers are sharing a private network. Then Computer A sets up a SOCKS PROXY with Computer C over the new private network and browses the website through Computer C.

Is what I'm thinking going to work? If no, can you provide a solution, if at all? If yes what sort of software would I need to set up and what sort of commands will I need to run to make these connections? All computers Linux but are different distros.

4
  • Do you have access to computer C? That is the real "middle man."
    – Ron Trunk
    Jan 8, 2014 at 18:20
  • 1
    What do you mean by "cannot see"? If Computer B cannot communicate with Computer C then Computer C cannot communicate with Computer B. At least not with TCP/IP. Jan 8, 2014 at 18:50
  • @Ron I have access to all computers providing Im on their private networks. I do not have access to Computer C over the public internet.
    – Scott
    Jan 8, 2014 at 20:07
  • @techie007 when I say see I mean cannot connect to it. This is because of the firewall not allowing inbound traffic to computer A or C
    – Scott
    Jan 8, 2014 at 20:08

2 Answers 2

2

First, I am going to assume that what you're asking to do doesn't violate any policies, regulations, laws, etc. That's not the kind of advice I give.

You need to configure relays on B and C. You can use netcat for this. It should be on most Linux distros.

On host C, you configure a client-client relay:

mknod mypipe p
nc host_B 80 < mypipe | nc web_server 80 | tee mypipe

Host C makes an outbound connection to host B on port 80. Anything it hears in response gets relayed to the webserver. On host B, you configure a listener to listener relay:

mknod mypipe p
nc -l -p 8080 < mypipe | nc -l -p 80 | tee mypipe

Host B listens on both port 80 and 8080. Whatever it hears on one port, it will send to the other.

Now, when you browse from Host A to Host B, on port 8080, you should be connected to the web server via Host C.

2
  • Very impressive. (1) If mknod doesn’t work, try mkfifo. (2) You might want to use a port other than 80 on Computer B (e.g., 8081) in case (a) there’s already a web server running there, or (b) the user isn’t privileged. Jan 8, 2014 at 23:18
  • Thanks for the edit. I used port 80 because I assumed it would be open on the firewall.
    – Ron Trunk
    Jan 8, 2014 at 23:19
0

You can run vpn server on B, but make sure client-to-client communication is enabled. Check Openvpn software, http://www.openvpn.net.

Then configure routing to route traffic from A to Website and back. Check the linux command ip route, http://linux.die.net/man/8/ip.

Another solution would be via 2 GRE tunnels instead of the 2 VPN tunnels above. Check gre tunnels on linux, e.g. http://tier.cs.berkeley.edu/drupal/howto/ip-tunnel-using-gre-on-linux.

I would prefer gre tunnels if the firewalls will pass it through.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .