|
A flag icon shows that page is written in:
|
Use Debian and edit /etc/network/interfaces like this:
auto eth0 iface eth0 inet static address 192.168.1.1 network 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 auto ppp0 iface ppp0 inet ppp provider dsl-provider up /usr/local/sbin/firewall.sh on down /usr/local/sbin/firewall.sh off
Edit /etc/ppp/peers/dsl-provider like this:
pty "pppoe -l eth0 -T 80 -m 1412" user account@provider.ne.jp
Run these to bring up and shut down ppp0:
ifup ppp0 ifdown ppp0
Edit /etc/network/if-pre-up.d/iptables
and configure
filter and nat tables.
$ sudo aptitude install dhcp3-server
Edit /etc/dhcp3/dhcpd.conf
and specify range
of addresses for the subnet you use for DHCP
automatic address assignment.
option domain-name "run.sh";
option domain-name-servers 192.168.1.1, 202.224.32.1, 202.224.32.2;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.100 192.168.1.244;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
}
$ sudo /etc/init.d/dhcp3-server restart
Jakarta Commons HttpClient:
Tutorial
HttpClient client = new HttpClient(); authget/authpost = new GetMethod(url) / PostMethod(url) authpost.setRequestBody(NameValuePair[]); excuteMethod(authpost)....
Programming a client and a server for httpchat will be a good practice.
XMLHttpRequest
UDP is most commonly used for DNS Lookups while its zones are transfered using TCP for the large quantity of transfers.
$fp = fsockopen(....);
fputs($fp, "hello");
$result = '';
while (!feof($fp)) { $result .= fgets($fp, 128); }
fclose($fp);
Helpful for creating CGI, text processing tools and background processes.
$ perldoc lwpcook
Have fun.
Ryu ryu@run.sh