Category Archives: Uncategorized

Burmese Visas: Not half as bad as it sounds

So now that everyone has left be in Bangkok (Rich and Cole are my two fellas that I hang with and both have run back to the USA for the next month to visit friends and family) I’ve begun my long-forgotten habit of blogging for the betterment of… humanity?

Well, anyway, I did go on quite the adventure today, I may as well document it. After being up until nearly 4am Bangkok time helping Rich pack for the USA (and shamelessly handing him an extra bag to carry with him all the way home, containing our newly purchased SCUBA equipment) I woke up at 7am to wish him well. It was just the same really, as I wanted to get an early start and head to the Burmese Embassy to get my visa for next week. That’s right, I’m traveling to one of the last wholly sanctioned nations on the planet – and I’m pumped.

So having read some really helpful posts online ( http://nat.org/blog/2011/02/myanmar-visa-in-bangkok/ – totally the most helpful) and speaking to a few friends, I headed down to get there when the doors opened at 8:30. After all, I didn’t want to be stuck without a visa because apparently they only have so many per day!

After a long chat on the phone with my father where we argued about who can make more money in the stock market (currently I’m winning, despite the fact that I was unable to put my desired actions in to play due to account restrictions) I hopped in the shower and realized it was already 8:00! No worries, I thought, plenty of time.

Taxi. Why did I pick a taxi? It was probably the air conditioning and the fact that I forgot about Bangkok traffic after living on an island in the South for the past two months (Koh Tao – a diver’s paradise, and paradise in general really. I’ll be moving back there some day soon). After the first 30 minutes in traffic, I was a bit nervous. The first hour had me worried. I was thankful that we got to the BTS (Bangkok Transit System – A big elevated railway that is the only way to move around downtown and not see hours of your day disappear) station after an hour and a half; everything looked so much worse.

If you’re keeping score, at this point then, it’s 9:30 and I’m just getting on the BTS that will take me to the stop near the embassy where then I have to walk to get to the actual office. Everything that everyone ever told me about not getting a visa because they had run out was running through my mind at the very same time as Thai patience was telling me to not care because no one moves that fast here anyway and it’ll all work out. I got to the proper station at about quarter to 10 (THANK YOU BTS!) and was in the office not moments before 10am rang in.

Now, that blog post advised going to a little shop down the road from the Burmese Embassy – do it! It’ll make your life so much easier. Just as it says, keep walking past the visa door until you see a yellow sign advertising ‘copy, print, fax’ in a tiny little shop. They have all the proper forms, will take your picture if you don’t have visa size photos, and make copies of your passport. I, in my infinite wisdom, did not do this. I walked up to the counter, asked for the forms, and filled them out right at the window (farthest to the left). Thankfully, I had two passport photos saved from my diving application on Koh Tao and I happened to be carrying my passport copy in my wallet. That avoided any delay, I handed my forms back to the woman, she double checked them and handed them back to me with a number. Perfect!

45 minutes and a nice conversation with a French man later, my number was called (I also snuck out to get additional copies of my passport so I could keep the one I usually stick in my wallet) and I handed in my forms, paid 1260 baht, about $30, and walked out the door with a receipt and a promise I could pick up my passport after 3:30PM that same day.

Having time to kill downtown in Bangkok is always a welcome thing. There’s tons to do, especially during the week when it’s not as busy and you’re not constantly running into people you don’t see because they are below your normal field of vision. Today however, I actually had a few goals – exchange some money for Burma and buy a new power adapter for a friend still on Koh Tao.

The money one is going to make you laugh. I have US dollars, but I needed new ones. I’m not kidding. Apparently Burmese people are like little gremlins about those greenbacks from the USA and if they aren’t near mint condition they are reluctant to take them. Having read this so many times online, I hopped back on the BTS and headed back to Siam where I knew there would be food and very big banks.

My stomach was grumbling but I really wanted to get the cash thing out of the way. I found the first massive ‘yellow bank’ I could find as it’s the bank I have an account at and I wanted to support them. Upon walking in, they looked at me like I had 8 heads when I told them I wanted to exchange US dollars for US dollars. US dollars to thai baht and then back to US dollars however, cha ching! A nice friendly smile and an assertive ‘can!’ A few moments later though, the manager showed up with a frown and told me the bank had no US dollar bills to give out! When I asked what branch I could go to that might have US bills, he pointed out the door. When I asked left or right (sigh or qua) I just got another nod towards the door. So I left, sorry ‘yellow bank.’

I then went to what should have been, in hind sight, my first option. Every Thai who’se ever needed to exchange money has gone here. No place other than… wait for it… SuperRich. I’d link to their website but it doesn’t seem to be working right now. Needless to say, this place is amazing. They exchange every currency under the sun, in nearly any quantity you can imagine. I was met with the same frown when I asked for USD to USD, but USD to Thai Baht to USD was a total win for everyone. I was assured the bills I would get would be crisp and clean and Burma ready, so I took a number and sat down. What I saw amazed me.

Everyone of every nation, creed, and backround was in this shop. People that looked as if they had not a cent to their name, and wealthy arabian businesmen walked in, exchanging cash. A British man needed 1060 Singapore dollars. A Thai businessman walked out with no fewer than $10,000 USD. That’s not a typo. The stacks of $100’s were about a foot high. He put them into a duffel and walked off. The lady after him just wanted some crisp 100 baht notes. The best part? The bank vault is so secure, they lock the person up there during the day. The bills are delivered to the ground floor (the vault is raised and sealed making it harder to get into) by a ladies handbag attached to a string. The orders for currency go up and cash comes down. After losing about $5 in the transaction (the spread was only 6 stang – 1 stang is a 100th of a baht and about 30 baht equal a dollar) I was met with the crispest USD’s I may have ever seen. They don’t come as crisp as I got them, from any bank I’ve ever been to in the USA. They probably came direct from the US mint. The staff even showed me what marks they will look for in Burma and assured me they all had them – they did. I was so satisfied that I exchanged ever last USD I had on my person with these guys so I had fresh crisp bills out the wazoo. My experience at SuperRich? SuperAwesome. (It’s right behind the Big C in Siam, across from Isetan and Central World if anyone ever wants to pay it a visit)

As the hunger pains were now feeling like they might never go away, I walked to Central World in search of a Fuji. I have been craving sushi for weeks and it was time. I had $600 in crisp bills in my pocket. It was a good feeling. Time to spend some! Alas, my quest for Fuji was thwarted by the fact that there is no Fuji in Central World. I settled on another sushi restaurant (Kobune) and it was a great choice. 25 baht appetizers and I had a sashimi carashi for 250 baht of awesome. Full of food, fresh bills, and confidence I continued to kill time before my 3:30pm pick up of my visa.

As I had been reading my travel guide to Burma while downing copious amounts of raw fish, I realized that I was in for some 12 hour bus rides in Burma. As I’ve already torn through every book that I have ever gotten my hands on in this country, I headed to AsiaBooks to find more. Find more I did but their size just killed me. I recently started packing for home and I know that if I were to buy these books there would be no way I could get them home – killer. I wandered around, drooling at book after book, then decided if I could find an Amazon Kindle I would buy that and a few books instead.

This journey for a Kindle took me the rest of the afternoon. I checked Central World, Siam Paragon, and MBK Center for this $150 piece of plastic and silicon and it’s no where to be found. I was devastated. I am still bookless as I write this but tomorrow is another day and I may be luckier then.

After a long day of wandering, I headed back to the embassy, picked up my passport, gave it a gander, and rejoiced. I had 28 days in one of the last wildernesses on Earth. Yet, I still hadn’t picked up a power adapter for my PADI Dive Master Mentor, Linzi. Sigh.

I took the BTS to an MRT (The subway in Bangkok) junction, and headed to the Rama 9 highway MRT station. Fortune mall, one of the longest malls in the world, stood before me and I had but one objective – find the store that an adapter was bought from and exchange it for the right one. The stars had aligned because I found the place in no more than 10 minutes and they had me exchanged and out the door in another 5. A 20 minute cab back to my apartment and I was home.

7am to 5pm was a long day of wandering. That said, I’m set to go to Burma (save for actually buying a ticket) I’ve got a ton done, and I feel like I actually was worth the air I breathed today. Not bad for a Thursday!

-Will

The end of the wireless woes!

So, this post is rather late but better late than never! My wireless card on my little phantom box that I had set up before just wouldn’t hold the connection. I don’t know if Linux wifi drivers were to blame, or if something else was up, but it bugged me to no end. My final solution to the problem was to do the following.

Router 1 -> (Obtains wireless signal and routes to wired ports) -> Router 2 -> (Takes ethernet from any of the Router 1 ports into the WAN port and re-broadcasts the signal)

This gives me a nice steady connection that I don’t have to bother with, save for having one computer logged in to the RADIUS http page. The good news is that if any one of the three of us who are sharing it are logged in, it works fine for the others – so there’s no weird login duplication that would get us blocked until our landlord unlocked the password.

I did run into a little snag though. When doing this setup, you have to make sure that the DD-WRT routers are set up so that the First Rne has the box that says: ‘Use DNSMasq for DNS’ on the ‘Basic Setup’ page, checked. The Second Router however, should have this box unchecked so those packets don’t get mapped from one private ip range to another and then have a hard time getting to the internet.

Once I figured that out (and it took me a long day of cursing) my internet woes have disappeared!

 

-Will

Setting up Wireless to Wired Internet sharing or why Ubuntu/Debian/Linux still isn’t ready for the desktop

In part three of my computer related posts, let me document the final part of my AILX/Router saga. The situation is as follows. I have an internet connection that I can only get via wireless that I want to share. I have a router that does a great job sharing, but since the internet is restricted using RADIUS authentication via an HTTP login page, I can’t exactly do that through the router’s webpage. Therefore I need a computer to login to the wireless and output the internet to a wired port that goes into my router to be shared.

Internet -> (via wifi and auth) computer -> (via wired) router -> (via wifi) internet for everyone!

I tried with firestarter but had no luck. It ends up being firewall and iptables frontend and I just don’t need that/it always messes things up.

I just re-installed Debian Lenny on my AILX board to use Network Manager to share the connection and low and behold! It doesn’t work. I followed every instruction to the T (including the ICS wiki from Ubuntu using my Ubuntu based netbook as the test computer) and nothing got even close to working. Not even a little bit. I sat at my desk after a day of trudging through documentation and wiki’s a sad and broken man.

Finally, my inner geek got the best of me and wouldn’t let me quit without trying a non-GUI solution. On the same Ubuntu ICS wiki ( https://help.ubuntu.com/community/Internet/ConnectionSharing ) there was a solution for sharing internet using iptables commands. Their example used two wired ethernet connections… hmm….

I changed a few lines and used the following instead of their example:

sudo iptables -A FORWARD -i wlan0 -o eth0 -s 172.16.4.56/16 -m conntrack --ctstate NEW -j ACCEPT
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A POSTROUTING -t nat -j MASQUERADE

wlan0 is my wireless interface and eth0 is the ethernet port that I’m sending the internet out from. I set it with a static IP of 172.16.4.56 – random, I know, but I was just trying things out. With one more command…

sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"

I was nearly done! All I did was configure my router (DDWRT) to use the following settings on the WAN port:

Static IP

WAN IP: 172.16.4.55

Subnet Mask: 255.255.0.0

Gateway: 172.16.4.56

Static DNS: 8.8.8.8

Static DNS: 8.8.4.4

This uses google as my DNS servers (faster here in Thailand) and gives my WAN port an IP one number lower than the address on my ‘routing’ pc.

TADA! It works like a charm. Who needs GUI configuration anyway?! Only Windows and OS X users I guess.

To make the changes stick even after a reboot:

Ptables settings need to be set-up at each boot (they are not saved automatically), with the following commands:

Save the iptables:

sudo iptables-save | sudo tee /etc/iptables.sav

Edit /etc/rc.local and add the following lines before the “exit 0” line:

iptables-restore < /etc/iptables.sav

Edit /etc/sysctl.conf and add these lines:

net.ipv4.conf.default.forwarding=1
net.ipv4.conf.all.forwarding=1

W00T! That should make it work like a charm. As of now, I’ve only tested it on my netbook, I’m going to set my AILX box up quickly and give it a go! I’ll report back and let you know if it works! 🙂

Setting up Debian Squeeze on an AILX board

Well, Firestarter never had worked well for me in the past and this time was no exception. I wish there was a simpler way to use iptables to route traffic without managing an entire firewall… oh wait, network manager in Debian Squeeze works fine! Alright then, time to switch.

I used the same procedure of building the image on my PC then writing it in one sweep to the flash card. Only this time I used VirtualBox because it works better and I found a command to convert the image to a raw file later on.

  1. Install Debian Squeeze from net-install cd
  2. Used ext3 and a swap partition even though ext2 and noswap would be a better option for an SSD/CF card, oh well!
  3. Set it up with grub and only the base-programs. No ‘desktop workstation’ this time, I wanted to slim down.
  4. Rebooted into the system
  5. Added contrib and non-free repos to apt’s sources.list
  6. Installed gnome-core, transmission, network-manager, htop, iceweasel (if not already installed), file-roller, firmware-ralink, iplist (may have to download and install seperately – used for ipblocker)
  7. Freenx on Squeeze doesn’t work right because the version from the Ubuntu repo want’s Ubuntu’s ‘upstart’ init system which would replace Debian’s init system. In light of this, I switched to using x2go, a similar program.
  8. Add the x2go repo to debian’s sources.lst (deb http://x2go.obviously-nice.de/deb/ lenny main ) The repo seems to work with all debians (squeeze worked fine, I also tried on debian 9.10 and it worked as well)
  9. Installed x2goserver-home
  10. Tested communication and hoped it worked – it did!
  11. Installed hamachi and set it to auto-start on bootup and make sure it’s logged in hourly via cron
  12. Set up the clock to use ntp by installing the ntp package. The system did the rest
  13. While I didn’t have to make a script to set the hwclock on shutdown this time, it might not be a bad idea in the future (see previous post)
  14. Didn’t have to stop GDM from coming up as gnome-core doesn’t have gdm
  15. Edited /etc/dhcp3/dhclient.conf and added "send host-name "MYHOSTNAMEHERE"; so that it would report properly to my router
  16. Made sure to apt-get clean
  17. Append noresume to the grub boot line to save boot time
  18. Shut down the VM and convert the VDI to a RAW img so I can write it to a CF card ( VBoxManage clonehd –format RAW IMAGENAME.vdi IMAGENAME.img )
  19. Took my RAW file and copied it to my CF card (dd if=AILX.raw of=/dev/NAMEOFCFCARDHERE
  20. Plugged everything in and tried it out
  21. Works like a charm!

Let’s just hope that the routing portion works this time… I’ll post back in a bit

PS. Once installed I also setup the second ethernet to a static IP so I could always plug in to the computer and get my x2go desktop if I couldn’t get to it via hamachi. I used network manager but it might not work – we’ll see if I have to manually set options in the interfaces file or not.

Setting up Debian 5.0 Lenny on an AILX board

In another geeky sidebar, I set up a little AILX box ( http://www.mini-box.com/Alix-2B-Board-2-LAN-2-MINI-PCI_3?sc=8&category=754 ) here in Thailand to share my internet with a few friends. I needed something low power with wireless and that motherboard with a USB wifi dongle I have fit the bill perfectly. I found the board, case, and a small CF card on ebay for just over $100. Awesome!

Installing debian and getting it configured was even easier than I remember the first time.

I wanted to minimize write’s to the CF card (as they only can be written a certain number of times) so I installed and setup the whole debian system in a QEMU VM first. I used QMEU with a RAW file so I could use dd to write it to the card later. So….

  1. Install Debian Lenny from net-install CD
  2. Used ext3 and a swap partition even though ext2 and noswap would be a better option for an SSD/CF card, oh well!
  3. Set it up with grub and the ‘desktop workstation’ selection from tasksel
  4. Rebooted into the system
  5. Added the freenx PPA for intrepid (it lines up with Lenny packages) (I may move to debian squeeze in the future at which point Lucid aka 10.04 is the one that lines up) and installed freenx and openssh
  6. Added the contrib and non-free repos to my sources.list
  7. Installed firestarter, firmware-ralink, htop, ntp
  8. Installed hamachi and set it to auto-start on bootup and make sure it’s logged in hourly via cron
  9. Set up the clock to use ntp via the Time/Date gui in Gnome
  10. Added an extra script to /etc/rc0.d and /etc/rc6.d that sets the system time to the hardware clock ( hwclock –systohc ) because it didn’t seem to be setting on shutdown or reboot (placed in /etc/rc.d and systemlinked to /etc/rc0.d and /etc/rc6.d)
  11. Stopped gdm from coming up by making the GDM startup entry in /etc/rc3.d non-executable
  12. Edited /etc/dhcp3/dhclient.conf and added "send host-name "MYHOSTNAMEHERE"; so that it would report properly to my router
  13. Made sure to apt-get clean
  14. Append noresume to the grub boot line to save boot time
  15. Took my RAW file and copied it to my CF card (dd if=AILX.raw of=/dev/NAMEOFCFCARDHERE
  16. Plugged everything in and tried it out
  17. Works like a charm!

In this case, there was no need to mess with a bootloader or anything else crazy. I didn’t even bother setting up a serial console for debugging without a monitor as I don’t have a computer with serial port here. In addition, with internet access it should come up on Hamachi wherever it is and allow me to ssh into it.

Phew. That’s documented, time to upload some pictures from the trip and finish blogging about it!

Quick First Post

Why hello!

I’ve just moved from Drupal to WordPress 3.0. Drupal was just more than I needed for a blog and a few other things. So, expect my old posts to be going up at some point and plenty of new ones to start right away!