Monday, June 28, 2010

NAT network and XBOX 360

Today i discovered a problem that seems to be very common for xbox and ps3 users. A router that is doing network address translation (short NAT).

Some important things about NAT
NAT is used because of a lack of IPv4 addresses. It "translates" the public domain IPs to private network IPs (for example 192.x.x.x or 10.x.x.x). There are different types of NAT if you are using the "Full Cone NAT" you probably never experienced any problems because once a port and ip is mapped this mapping will stay the same for any further connection.
The second type is (address) restricted NAT. Connections can only start form our (home) network. If there is once a connection it will use the same port for further communication. If you're using this type of NAT you may have experienced some problems.
The Third NAT type is called symmetric NAT. Only an external host who received a packet from an internal host can send packets back. Each request from the same internal IP address and port to a specific destination IP address and port is mapped to a unique external source IP address and port. (this is ambiguous)If the same internal host sends a packet even with the same source address and port but to a different destination, a different mapping is used.

If you want more information about this you will find them on wikipedia.

Changing your router settings
I read about people who put their xbox or ps3 into a DMZ. That may be a solution for the NAT problem but that's a serious security issue. I got a Linksys WAG54G. All i needed to do is disable UPnP and setting a port range forwarding. You do not need to set your xbox or ps3 a static IP if you're using it on a daily base because the DHCP table reserves the address for 24 hours(linksys default, may differ with other router).

Then i forwarded all the ports i needed for my games. (You will find on portforward a very detailed instruction on how to do this).

UPDATE
I forgot to say that if you do the same things as i did you do not change your network type. You will still have a NAT but it's now "open" (and not strict anymore) and allows you to join more games.

Monday, June 14, 2010

Langton Ant

Today I finally wrote a program to simulate Langton’s ant. I wrote it together with a classmate as a school project. The most difficult part was not the logic itself it was the design of the GUI because none of us ever wrote a java program with a GUI.

Langton’s ant shows how a determined system based on simple rules can create both complex chaotic and complex regular patterns. The next step is making the program able to handle multiple ants with different colors. Here you can view our program. The code is online available on Google Code.

Tuesday, June 8, 2010

Apache and it's virtual servers

Obviously apache means it searious when it says something is not supported.


VirtualHost XXX.XXX.XXX.XXX:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results


It went well for a few months but as i wanted to add a new subdomain apache didn't want to start anymore. That's the reason why my website  is currently not available (and that's the reason why i wanted to use blogger and not host this blog on my own server =P).

I think this may happen (or is already happend) to other people and i tried to figure out what could help.

What doesn't help is remove all virtual hosts and start just with the "default" page. Changing the ports of the virtual hosts doesn't help either. Even reinstallig apache is not a solution.

to be continued...