Suppose you have two computers and only one network cable coming into the room, and you want to save a few bucks and a bit of clutter and not buy a switch....
One could set up one of the computers as a router per , creating a sub-network within the room. But what if you do *not* want to create a sub-network, ie. you want both computers on the same network?
The solution is to create a transparent network bridge between two ethernet interfaces on one of the computers. On Debian, I use the bridge-utils package.
The bridge-utils-interfaces manpage is a bit general, the best reference I have found is here.
Setup is really quite simple in principle. Create the following stanza in /etc/network/interfaces:
auto br0 iface br0 inet dhcp bridge_ports eth0 auto eth2 iface eth2 inet manual up ifconfig $IFACE 0.0.0.0 up post-up brctl addif br0 eth2
Here eth0 is attached to the outside network, and added to the bridge br0 immediately. The br0 dhcp gets its IP through eth0, and the local computer networks through br0-eth0. (This should work irrespective of whatever might be going on with eth2.) eth2 is added to the bridge, but it is not configured locally with an IP because it does not need an IP. The only part eth2 plays in the network is to relay traffic between the br0 bridge and any computer attached to it. Any computer connecting to eth2 must take care of its own IP, through DHCP, for example, which the bridge would just relay to the DHCP server in the outside network.
At this point I have my firehol firewall turned *off*, which is non-ideal. Once I figure out how to incorporate a firewall into bridging, I will post.
I have this thing about keeping older machines usable for as long as possible. In other words, I resist bloat-ware that just assumes any computer more then two years old should be placed in a dumpster. So I currently own about a half a dozen laptops, and none of them are faster then a late-model Pentium III. And this works fine for me, as long as I make judicious choices about what software should run on what machine, and when.
Getting backups done painlessly has caused just such a "judicious choice"....
As it turns out, Spideroak has a lot going for it, but fast it is not. Unsurprisingly, Spideroak is a Python app, and Python is also a language that "has a lot going for it, but fast it is not". Its not just that Spideroak is just slow, but like its Python sibling, Miro, it tends to bog down my whole system and reduce responsiveness. For the moment, I will resist the urge to add Spideroak to my list of open source resource hogs, as I have not yet experimented with running it "niced".
This brings backuppc back into favor for me. And I have found a partial fix for the fact that backuppc also bogs down the server it is running on: put this is the root cron:
1 * * * * /usr/bin/renice 15 -u backuppc > /dev/null 2>&1
backuppc starts backups right on the hour. This cron job reduces the priority of all running backuppc processes one minute after every hour. Much better. And no operator intervention required, unless I am watching a really CPU-intensive video on that box and need to stop backuppc entirely.
Several days later I am still very pleased with the operation of my enrypted directory. So far zero inconvenience, and no noticable overhead / slowing of system response. I am sure there may be unintended consequences, like file availability for my external backuppc server or during SSH sessions, but I have not yet investigated.....
I just bumped into another encryption solution called Truecrypt, where they provide the rather astonishing capability of having a hidden operating system whose existence cannot be proved. Apparently this works by installing a decoy operating system and an "outer" truecrypt-encrypted volume. Then within this outer volume, installing an "inner" truecrypt-encrypted volume, which because it is inside the outer one, will always appear as just random data (until decrypted). And they have set it up so there is no way for the existence of the inner volume and its operating system to be detected. Really, really clever.
In other words, if someone is trying to extort your passwords, you need merely give them the passwords for your decoy OS and outer volume. The only headache / overhead I can really see (aside from needing to remember two passwords, for decoy and hidden OS) is that one actually needs to use the decoy OS a fair bit, in order to plausibly claim that it is your *only* OS and not lead a clever interrogator think that maybe there is more then meets the eye on your hard drive.
Really, really clever. But I am not seeing any packages in the Debian archive, apparently there are licence issues....
I am a Canadian who has lived in Beijing for four years now, and I walk a lot. Some locals tell me that I know Beijing better then they do. So perhaps my opinion of Beijing's various tourist traps(!), er, sights, might be of interest to others.
Let me dispose of shopping first. I am not a shopper, so I do not intend to say much, except buyer beware! Counterfeit goods are plentiful and often difficult to distinquish from originals. If the price is unbelievably low, then you have a fake in your hands. The cheapest goods are often of very low quality, and might break the first day you use them. Foreigners are charged very high prices. Starting prices for foreigners wandering around in markets are generally *at least* double or triple what a local would pay, so bargain hard, or take along a local who knows the terrain. That said, if you walk into a big shiny new mall, goods are legitimate, and prices will be not much different then wherever you just came from (maybe more, because of luxury taxes....)
Beijing's parks: Tiantan 天坛, Ditan 地坛, Ritan 日坛, Yuetan 月坛 parks (Heaven, Earth, Sun, Moon) found at the four cardinal points just outside the 2nd Ring Road. The Old Summer Palace 圆明园 in the Northwest just north of Beijing University. The Summer Palace 颐和园 further to the Northwest, just at the edge of the city. Xiangshan Park 香山公园 and the Beijing Botanical Garden 北京植物园 at the extreme Northwest edge of the city. Beijing's parks are beautiful, peaceful, and sprinkled with old temples and architecture that in some cases goes back millennia. Special mentions are the massive temple complex in Tiantan, the Buddhist Temple Wofosi 卧佛寺 in the Botanical Garden, and the thousands of martial artists training every morning in Tiantan.
The Hutongs 胡同: Beijing's traditional courtyard / narrow lane neighborhoods. These are shrinking rapidly because of development, or in some cases being renovated into something that does not much resemble the original. Old neighborhoods still exist in many places. From Ditan Park, head south across the 2nd Ring Road and then hang a left just after you pass Yonghegong Temple. Or head straight south from Tiananmen Square and you will find more. Walk around Houhai Lake just inside the Northwest 2nd Ring Road and there are many examples of old, and highly renovated, courtyards, as well as shops and restaurants.
Tiananmen 天安门 Square: its big, free, and surrounded by a lot of imposing architecture.
Simatai Great Wall: The Great Wall passes very close to Beijing, there are many areas that are highly accessible from Beijing, and they are therefore absolutely over-run by tourists. And in some cases renovated so as to look like they were build just last year. Traffic is horrible, crowds can be so dense as to render one as unable to move.... Simatai is far enough out (three hours drive) that very few people go there. I have been there twice (three times?) and seen just a handful of people each time. Renovations are minimal. It is possible to spend the night in local guest houses.
Eat a lot. Do not be afraid of street food, hygiene levels are quite reasonably high. You can eat very well and very cheaply, or very well and very expensively (though the former is more difficult without Chinese skills).
Any part of the Great Wall except Simatai, unless it is the dead of winter, which has a way of reducing the crowds.
The Forbidden City. It is definitely worth seeing once, but it was completely stripped of anything that could be carried away during the Revolution, so it seems, at least to me, to be kind of.... empty. There is a garden in the north end with very old trees, and another one just outside the complex on the East side, which I thought still retained some feeling.
The campuses of Beijing University and Tsinghua University (adjacent to one another at the Northwest 4th Ring Road) are big and beautiful.
Shopping, for reasons enumerated at the top. Unless you want something very specific, like jade or Chinese artwork. Then be prepared to bargain.
Most Temples. Most of them feel like tourist traps manned by fake monks. There are some exceptions, but I generally feel regret after paying the door charge at these government-run institutions.