个人工具

UbuntuHelp:UbuntuLTSP/ThinClientProxyRedirect

来自Ubuntu中文

跳转至: 导航, 搜索

Parent: UbuntuLTSP This page has been moved from ThinClientProxyRedirect on 2009-07-23

Thin Client Proxy Redirect How-To

This How-To describes an alternate way for browsers that run as local app on the thin client, to access the internet, by using a proxy on the LAN. For a way to access the internet for more than browsing, or if you don't have a proxy on your LAN, see ThinClientHowtoNAT. This is generally only necessary if you have the LTSP server running with two interfaces, one facing the main network and internet, the other facing the thin clients. For machines on the thin clients to get internet access (eg a thin client booted into windows, a local app on a thin client), they must pass their requests through the LTSP server.

Requirements

You will need: A Thin Client Server fully configured, with at least 2 network interfaces, one connected (or that can go) to the internet and one dedicated to the Thin Client Network. The following steps assume that the LTSP Server is on a LAN with a http proxy. An other method would be to install the http proxy on the LTSP Server (and that is even more simple than the instructions below).

So how do you do it?

The ideas

The conceptual steps are:

  1. Ensure the LTSP server has internet access and the clients boot on the LTSP network.
  2. Ensure the LTSP server can reach the proxy on the LAN.

What you need to know

  1. The IP address of your proxy server on the LAN (in this example: 10.0.0.1)
  2. The port on which the proxy runs (3128)
  3. The IP address of the LTSP server on the LAN (in this example: 10.0.0.2)
  4. The IP address of the LTSP server on the Thin Client side (in this example: 192.168.0.1)

Practical Instructions

Each of these steps matches the ideas above. Please carry out the tests as you go, so you know you're on the right track:

  1. Boot a standard thin client on the ltsp network and make sure it can get web access. If this doesn't work, you need to go back to the ltsp setup first.
  2. Make sure you have Firefox installed as Local Apps (see LTSPLocalAppsJaunty)
  3. Check that in the localapps Firefox, you can not browse and domain names are not resolved
  4. Install 'redir' on the LTSPServer:
       sudo apt-get install redir
    
  5. Start redir on the LTSPServer:
       sudo redir --laddr=192.168.0.1 --lport=3128 --cport=3128 --caddr=10.0.0.1 --bind_addres=10.0.0.2
    
  6. Explanation:
    1. --laddr: the local address of the LTSP server on the Thin Client side
    2. --lport: arbitrary, but 3128 is the standard.
    3. --cport: it's the port my squid proxy runs on by default
    4. --caddr: the address of the firewall/proxy on the LAN
    5. --bind_addr: the address of the LTSP server on the LAN side.
  7. Configure your localapps Firefox so that it uses 192.168.0.1:3128 as proxy for http.

Caveats

  1. redir might stop working. You need to wrap it in a script so that when it dies, it's started immediately. Also maybe make sure it starts at boot.
  2. You can only do browsing (http port 80; no https). Actually HTTPS should work if the proxy is correctly set up, but non-proxied applications (smtp, imap, pop3, rtsp, realplayer, bittorrent, ) will not work.
  3. The problems mentioned in other documentation about DNS resolving are not available here: the proxy handles the DNS requests.
  4. No editing of DHCP server, gateway, etc needed. Is that a caveat? Maybe not.
  5. You must set up firefox (and any other http clients) to connect via the proxy for every local apps user.