Cross-Origin Resource Sharing (CORS)

Cross-origin resource sharing (CORS) is an interesting technology that will be very useful for one of our new upcoming products. It is a technology that will allow us to use the Browser as a proxy to connect to a different machine using Javascript. It is also supported by all modern browsers, which is a good thing.

This technique, when combined with XMLHTTP connections will allow us to effectively create a tunnel between the primary server and a secondary server via the browser. This allows the public server to communicate directly with the private server across the web-browser using pure Javascript.

This is exciting…

Advertisement

ZTE VDSL with Any Router

I’ve configured the ZTE 931Dll VDSL modem to be used with our standard DD-WRT router. This required modifying the ZTE settings to perform VLAN bridging for the DD-WRT router.

The general steps are outlined in another blog.

However, the critical last step is different. I tried the steps at the blog but it didn’t work. Using my head, I decided to try a different setting, which worked.

Set the LAN4 trunking to:
Enable VLAN trunk: Checked
Supported VLAN Number: 0
PVID: 500

Then, configure the DD-WRT router to perform PPPoE as normal.

That’s all!

Unifi is Unstable

Seriously, there is something wrong with the Unifi setup at my office. While the line is currently working, it’s stability is in question. With a 37% packet loss to Google servers, there is definitely something going wrong here. I have made a report (1-1864549262) and this is the second time it is exhibiting the same unstable symptoms.

I’ve got even more ping results but they all reflect the same problem – about 40% packet loss. Even connecting to Google is a problem. And this is the Business package, where we are paying more for less service. I really do not understand why I always have these problems.

It took them a month to sort out my Streamyx problems previously too.

Unifi Speed Test

I had Unifi installed at home today. The whole process was rather cumbersome but the contractors managed to get things done in about 2-hours or so. Instead of drilling holes in the wall, I had them thread the fibre through the ceiling into my server rack. This cost me RM200 extra.

After that, the contractor showed me the speedtest results with OOKLA.

I had ordered the VIP5 package, which comes with a 5Mbps line. Seeing that OOKLA reported a 4.8Mbps speed was quite a good sign. However, instead of just trusting OOKLA, I decided to do a little test of my own. I ran my own iperf tests against my servers in the UK, US and Germany.

The results are a mixed bag but generally, it averages above 3Mbps.

I won’t really complain much at the moment until I complete testing it further. One thing that I’m not quite happy with though, is the need to use the supplied DIR-615 router. I will need to investigate the possibility of using my own router further.

PS: I noticed that the results depend on the network that I get to connect to. This is another result that I obtained later in the night. Look at the speeds and ping latency!

Region and Country

I recently realised that there are a lot of corporate websites out there that will ask a user for region/country when visiting, and then forward the user to a different landing page depending on the geographical location of the user. With the technology available today, I sometimes wonder why any of this is necessary at all.

There is such a thing called GeoIP. While it is not 100% accurate, it is largely accurate and is used by certain people like Google analytics to work out where a site’s visitor comes from. It occurred to me that these websites should just use GeoIP to redirect the user to the appropriate landing page instead of asking the user a bunch of useless questions.

This is just a random thought.

Streamyx Modem Hack

I recently installed a new Streamyx package at my office. It came with a free Riger WL108 modem which was quite limited. The configuration options available were appalling and the security of the device was non-existent. It was just using WEP and it took me under 2-minutes to crack the keys.

However, what is not often documented is that the modem is capable of much more as there is a hidden administrative function. Just login to the modem as tmadmin:tmadmin and the system will expose all sorts of goodies.

Wireless Security
Look under Wireless – Security and we can enable WPA2, both the PSK and EAP versions are available. I set mine to PSK as I wanted to use it as a public access wifi for authorised personnel.

DMZ
Look under Advanced Setup – NAT – DMZ Host and we can specify a DMZ host to use. I love this option as it will allow me to remotely login to my office network and access certain services from anywhere in the world. This will be very useful as a VPN entry for road-warriors.

Dyamic DNS
Look under Advanced Setup – DNS – Dynamic DNS and we can configure it to talk to any of the dynamic DNS services available. As my office network is on a dynamic IP, this will be handy to access my office network using a domain name instead.

There is a lot more stuff that can be configured and a lot of capabilities are actually built into the modem, just not enabled nor accessible from the regular user access menu.

So, I was able to get a lot of advanced features working without going out to buy a new modem. I was actually contemplating this and am glad that I will be able to save up the RM100 or so instead.