FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Edubuntu User

LinkBack Thread Tools
Old 08-15-2012, 07:40 PM
John Hupp
Default Getting NAT working for Internet Local Apps under LTSP

As I understand it, the Local Apps settings are
enabled by default in Lubuntu 12.04.* Once LTSP is also
installed, that means that one can run on the LTSP client
hardware (instead of the LTSP server hardware) any app that is
installed in the LTSP chroot image.* For instance, xterm can be
run on the client via "ltsp-localapps xterm" (ltsp-localapps
being the script command by which an app must be launched

To run an additional app locally, just install it in the
chroot and update the image:

*** sudo chroot /opt/ltsp/i386

*** sudo apt-get install <app-of-your-choice>

*** sudo ltsp-update-image

HOWEVER, Internet apps will launch but not work at this
point due to Name Resolution failure.* So the LTSP server
has to be set up as a NAT gateway.

As far as I know, the most relevant instruction for doing
that is here: https://help.ubuntu.com/community/UbuntuLTSP/ThinClientHowtoNAT/

But I have not gotten that working, so I want to summarize
the steps of that instruction here and insert comments about
my own implementation.* I trust someone will spot the

** Edit /etc/ltsp/dhcpd.conf (sudo gedit
/etc/ltsp/dhcpd.conf) setting the routers option to the ip
address of the ltsp server on the ltsp network. eg

** option routers;

and restart the dhcp server

** sudo /etc/init.d/dhcp3-server restart

ON 11.10 restart the dhcp server

** sudo /etc/init.d/ish-dhcp-server restart

Test: Reboot the test PC on the thin client network and
check if it sees the new default gateway (on linux type ip
route and look at the line beginning "default"; on windows
type "route print" into a command prompt and look for
default gateway).

[COMMENT: I understand that LTSP servers have variously been
set up with default or, but that
now people are pressing for a uniform default of, which is the way mine is set up.* I found
dhcpd.conf already had "option routers"
enabled.* And my test PC did indeed show a default gateway

** On the LTSP server edit /etc/sysctl.conf (sudo gedit
/etc/sysctl.conf) and either add this line or uncomment if
it's already there:

** net.ipv4.ip_forward=1

which will take effect at next server reboot. To make the
setting effective immediately, now run the command

** sudo sysctl -w net.ipv4.ip_forward=1

[COMMENT: I only had to un-comment the line.]

** Enable network address translation. By default the ltsp
network address/mask is Remember to change
the example to fit your network setup. Use a command like:

** sudo iptables --table nat --append POSTROUTING --jump
MASQUERADE* --source

to enable NAT. To make this setting permanent run

** sudo sh -c 'iptables-save > /etc/ltsp/nat'

and add the extra line up iptables-restore <
/etc/ltsp/nat to the bottom of the eth0 (or whichever is
your LTSP interface) stanza of /etc/network/interfaces so it
looks something like

*** auto eth0

*** iface eth0 inet static

*** ** * ** address

******* *** netmask

*** ******* broadcast

*** ** * ** network

******* *** up iptables-restore < /etc/ltsp/nat

This creates a script called /etc/ltsp/nat which restores
the NAT next time the eth0 network interface comes up. Test:
ping the dns server on the main network from the test PC.

[COMMENT: I used the first two commands as written.* My
network is the default* And since my LTSP
interface it eth1, I added the following to interfaces:

*** auto eth1

*** iface eth1 inet static

*** ** * ** address

******* *** netmask

*** ******* broadcast

*** ** * ** network

******* *** up iptables-restore < /etc/ltsp/nat

But I thought it of interest that neither eth0 nor eth1 was
initially configured via /etc/network/interfaces.* Lubuntu
seems to prefer Preferences: Network Connections, a nice
GUI, and that is what I used to set up eth1 for LTSP.* But
here, I didn't know how to use Network Connections to add "up iptables-restore <
/etc/ltsp/nat."* So I hoped editing interfaces as instructed
would do the job.]

** Again, edit /etc/ltsp/dhcpd.conf, as above, setting the
dns option to the ip address of the main network DNS server
(listed in /etc/resolv.conf on the LTSP server beside the
word "nameserver"), e.g.

** option domain-name-servers;

and again restart the dhcp server

** sudo /etc/init.d/dhcp3-server restart

Test: Reboot the test PC again, to update its DNS server.
Try pinging a real world server from the test PC by name, eg

** ping www.ubuntu.com

[COMMENT: /etc/resolv.conf
showed for the nameserver.* Given the
instruction's example of, this address seems
unexpected, but I tried it and it did not work.* I also
tried* Also, the address of the
router, which I would have taken to be a good bet.* I also
set the router to and tried that for
the dhcpd.conf domain-name-server.* (See more on that
below.)* Finally I tried the openDNS servers that are set up
in the router:;* Most of my
failures simply resulted in Name Resolution failures when
local app chromium-browser was trying to find a site.* But
at this point, something in my configuration seems to have
disabled LTSP DHCP altogether -- the LTSP client does not


MORE GENERAL INFO: My DSL modem is an AT&T that uses a
non-configurable LAN-side address of

Initially I had the router set to,
and computers on the main network can ping and open the
configuration page for the modem.* I was concerned that this
would conflict with the LTSP server at, but LTSP
clients worked OK -- perhaps because of the differing
netmasks of vs.

I also tested setting the router at* In this configuration computers on
the main network cannot see the modem at

edubuntu-users mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/edubuntu-users

Thread Tools

All times are GMT. The time now is 09:54 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org