New Web Server Is Cool


I'm using a NAT router and it's a fairly simple process to get the GP2X portforwarded.

To set up networking, you need to set the GP2X's IP to something within your subnet range, usually the first 3 parts of your IP. You then go into the properties for your created net device and set that IP to one different from the GP2X's.

You then port-forward 80 to the GP2X IP.
 
BradN posted on May 3 2006 at 09:02 AM said:
You may be able to connect it directly to a USB capable cable modem via usb host on the gp2x, but it's unlikely your ISP will allow two simultaneous connections...

dont let them see 2 ip,s or am i off totaly ?

#!/bin/sh
IPTABLES=/usr/sbin/iptables
#All The lines below are NAT routing
IPTABLES -F -t nat
# turn on NAT (IP masquerading for outgoing packets)
$IPTABLES -A POSTROUTING -t nat -o usb0 -j MASQUERADE
# enable IP forwarding (of incoming packets)
echo 1 > /proc/sys/net/ipv4/ip_forward
 
Last edited by a moderator:
thelamer posted on May 3 2006 at 08:09 AM said:
Does anyone know the complexity of the webserver ?

PHP capibilities ,mysql , etc ??
If you create a small webpage: test.php
with contents:

<?php phpinfo()?>

save it in /usr/gp2x/www
with ownership and group = root
with mode = rwx

and use your web browser with URL: http://10.1.0.235/test.php

then you will have some extra information.

System: Linux gp2x 2.4.25 #3390 2006. 04. 20. (¸ñ) 14:31:55 KST armv4l

I see PHP version 4.4.2 but without any database.
I have been using sqlite with good results and it can
embedded in PHP version 5.x.x so maybe an upgrade
could be requested for the next version of the firmware.
 
Last edited by a moderator:
I don't know if anyone knows this, but can change background pictures for the skin instantly, just by copying the picture into the directory
 
Back
Top