ダイアルアップサーバ(3)ルータにする

Debian LS-QVL

小さなサーバが一息ついたので、
次は大きなダイアルアップルータにとりかかる(まったくもって謎。
イーモバイルの D02HW を使って PPP 接続できるようになったので、
ダイアルアップルータにする

基本的に、 SheevaPlugの時に準じる

iptables のインストール

root@qvl:~# apt-get install iptables
Reading package lists... Done
Building dependency tree
Reading state information... Done
iptables is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@qvl:~#
あれ?いつ入れた?

iptables の設定

非公開(自信がないので怖くて(藁
+ iptables -F
FATAL: Module ip_tables not found.
iptables v1.4.8: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
ぐはー。 モジュールが足りない。

カーネルモジュールの追加

iptables をモジュールで追加する

make menuconfig

yasunari@qvl:/usr/src/linux-2.6.31.8$ make menuconfig
iptables ってどこにあるの?

/ を押す

 .config - Linux Kernel v2.6.31.8 Configuration
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq


  lqqqqqqqqqqqqqqqqqqqq Search Configuration Parameter qqqqqqqqqqqqqqqqqqqqqk
  x  Enter CONFIG_ (sub)string to search for (with or without "CONFIG")     x
  x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
  x xIPTABLES                                                             x x
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
  x                                                                         x
  x                                                                         x
  tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
  x                         <  Ok  >      < Help >                          x
  mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

OK を選択

 .config - Linux Kernel v2.6.31.8 Configuration
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
  lqqqqqqqqqqqqqqqqqqqqqqqqqqqq Search Results qqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
  x Symbol: IP_NF_IPTABLES [=n]                                             x
  x Prompt: IP tables support (required for filtering/masq/NAT)             x
  x   Defined at net/ipv4/netfilter/Kconfig:52                              x
  x   Depends on: NET && INET && NETFILTER                                  x
  x   Location:                                                             x
  x     -> Networking support (NET [=y])                                    x
  x       -> Networking options                                             x
  x         -> Network packet filtering framework (Netfilter) (NETFILTER [= x
  x           -> IP: Netfilter Configuration                                x
  x   Selects: NETFILTER_XTABLES                                            x
  x                                                                         x
  x                                                                         x
  x Symbol: IP6_NF_IPTABLES [=n]                                            x
  x Prompt: IP6 tables support (required for filtering)                     x
  x   Defined at net/ipv6/netfilter/Kconfig:45                              x
  x   Depends on: NET && NETFILTER && INET && IPV6                          x
  x   Location:                                                             x
  x     -> Networking support (NET [=y])                                    x
  x       -> Networking options                                             x
  x         -> Network packet filtering framework (Netfilter) (NETFILTER [= x
  x           -> IPv6: Netfilter Configuration                              x
  x   Selects: NETFILTER_XTABLES                                            x
  x                                                                         x
  tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(100%)qqu
  x                                < Exit >                                 x
  mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

Networking support → Networking options → Network packet filtering framework (Netfilter) → IP: Netfilter Configuration に あるようだ。
 .config - Linux Kernel v2.6.31.8 Configuration
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
  lqqqqqqqqqqqqqqqqqqqqqqqqqq Networking options qqqqqqqqqqqqqqqqqqqqqqqqqqqk
  x  Arrow keys navigate the menu.  <Enter> selects submenus --->.          x
  x  Highlighted letters are hotkeys.  Pressing <Y> includes, <N> excludes, x
  x  <M> modularizes features.  Press <Esc><Esc> to exit, <?> for Help, </> x
  x  for Search.  Legend: [*] built-in  [ ] excluded  <M> module  < >       x
  x lqqqq^(-)qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
  x x    [ ]   TCP: MD5 Signature Option support (RFC2385) (EXPERIMENTAL) x x
  x x    < >   The IPv6 protocol  --->                                    x x
  x x    [ ] Security Marking                                             x x
  x x    [*] Network packet filtering framework (Netfilter)  --->         x x
  x x    < > The DCCP Protocol (EXPERIMENTAL)  --->                       x x
  x x    < > The SCTP Protocol (EXPERIMENTAL)  --->                       x x
  x x    < > The TIPC Protocol (EXPERIMENTAL)  --->                       x x
  x mqqqqv(+)qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
  tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
  x                    <Select>    < Exit >    < Help >                     x
  mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

ふげぇ、モジュールにできない。と言うことはカーネルの作り直し
 .config - Linux Kernel v2.6.31.8 Configuration
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
  lqqqqqqqqqqqqqqqqqqqqqq IP: Netfilter Configuration qqqqqqqqqqqqqqqqqqqqqqk
  x  Arrow keys navigate the menu.  <Enter> selects submenus --->.          x
  x  Highlighted letters are hotkeys.  Pressing <Y> includes, <N> excludes, x
  x  <M> modularizes features.  Press <Esc><Esc> to exit, <?> for Help, </> x
  x  for Search.  Legend: [*] built-in  [ ] excluded  <M> module  < >       x
  x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
  x x    < > IP Userspace queueing via NETLINK (OBSOLETE) (NEW)           x x
  x x    <M> IP tables support (required for filtering/masq/NAT)          x x
  x x    < >   "addrtype" address type match support (NEW)                x x
  x x    < >   "ah" match support (NEW)                                   x x
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
  tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
  x                    <Select>    < Exit >    < Help >                     x
  mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

IP tables support を M に。
続いて
Networking support → Networking options →
Network packet filtering framework (Netfilter) →
Core Netfilter Configuration で
Netfilter connection tracking support を M に
Connection tracking flow accounting を * に
Connection mark tracking support を * に
Connection tracking events を * に
"multiport" Multiple port match support を M に
"state" match support を M に

Networking support → Networking options →
Network packet filtering framework (Netfilter) →
IP: Netfilter Configuration で、 IPv4 connection tracking support を M に、
Packet filtering を M に、
REJECT target support を M に、
Full NAT を M に、
MASQUERADE target support を M に、

こんなところか、、、

yasunari@qvl:/usr/src/linux-2.6.31.8$ diff -c .config_D02HW_OK .config
*** .config_D02HW_OK    Mon Jul 23 22:46:23 2012
--- .config     Wed Jul 25 23:17:24 2012
***************
*** 1,7 ****
  #
  # Automatically generated make config: don't edit
  # Linux kernel version: 2.6.31.8
! # Mon Jul 23 22:46:23 2012
  #
  CONFIG_ARM=y
  CONFIG_SYS_SUPPORTS_APM_EMULATION=y
--- 1,7 ----
  #
  # Automatically generated make config: don't edit
  # Linux kernel version: 2.6.31.8
! # Wed Jul 25 23:17:24 2012
  #
  CONFIG_ARM=y
  CONFIG_SYS_SUPPORTS_APM_EMULATION=y
***************
*** 316,321 ****
--- 316,322 ----
  CONFIG_MV_ETH_NFP=y
  CONFIG_MV_ETH_NFP_DEF=0
  CONFIG_MV_ETH_NFP_AGING_TIMER=15
+ # CONFIG_MV_ETH_NFP_NAT_SUPPORT is not set
  # CONFIG_MV_NFP_STATS is not set
  CONFIG_MV_GATEWAY=y

***************
*** 510,516 ****
  # CONFIG_TCP_MD5SIG is not set
  # CONFIG_IPV6 is not set
  # CONFIG_NETWORK_SECMARK is not set
! # CONFIG_NETFILTER is not set
  # CONFIG_IP_DCCP is not set
  # CONFIG_IP_SCTP is not set
  # CONFIG_TIPC is not set
--- 511,619 ----
  # CONFIG_TCP_MD5SIG is not set
  # CONFIG_IPV6 is not set
  # CONFIG_NETWORK_SECMARK is not set
! CONFIG_NETFILTER=y
! # CONFIG_NETFILTER_DEBUG is not set
! CONFIG_NETFILTER_ADVANCED=y
!
! #
! # Core Netfilter Configuration
! #
! CONFIG_NETFILTER_NETLINK=y
! CONFIG_NETFILTER_NETLINK_QUEUE=y
! # CONFIG_NETFILTER_NETLINK_LOG is not set
! CONFIG_NF_CONNTRACK=m
! CONFIG_NF_CT_ACCT=y
! CONFIG_NF_CONNTRACK_MARK=y
! CONFIG_NF_CONNTRACK_EVENTS=y
! # CONFIG_NF_CT_PROTO_DCCP is not set
! # CONFIG_NF_CT_PROTO_SCTP is not set
! # CONFIG_NF_CT_PROTO_UDPLITE is not set
! # CONFIG_NF_CONNTRACK_AMANDA is not set
! # CONFIG_NF_CONNTRACK_FTP is not set
! # CONFIG_NF_CONNTRACK_H323 is not set
! # CONFIG_NF_CONNTRACK_IRC is not set
! # CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
! # CONFIG_NF_CONNTRACK_PPTP is not set
! # CONFIG_NF_CONNTRACK_SANE is not set
! # CONFIG_NF_CONNTRACK_SIP is not set
! # CONFIG_NF_CONNTRACK_TFTP is not set
! # CONFIG_NF_CT_NETLINK is not set
! CONFIG_NETFILTER_XTABLES=m
! # CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
! # CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set
! # CONFIG_NETFILTER_XT_TARGET_MARK is not set
! # CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
! # CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
! # CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
! # CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
! # CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set
! # CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
! # CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set
! # CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set
! # CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set
! # CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set
! # CONFIG_NETFILTER_XT_MATCH_DCCP is not set
! # CONFIG_NETFILTER_XT_MATCH_DSCP is not set
! # CONFIG_NETFILTER_XT_MATCH_ESP is not set
! # CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
! # CONFIG_NETFILTER_XT_MATCH_HELPER is not set
! # CONFIG_NETFILTER_XT_MATCH_HL is not set
! # CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
! # CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
! # CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
! # CONFIG_NETFILTER_XT_MATCH_MAC is not set
! # CONFIG_NETFILTER_XT_MATCH_MARK is not set
! CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
! # CONFIG_NETFILTER_XT_MATCH_OWNER is not set
! # CONFIG_NETFILTER_XT_MATCH_POLICY is not set
! # CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
! # CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
! # CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
! # CONFIG_NETFILTER_XT_MATCH_REALM is not set
! # CONFIG_NETFILTER_XT_MATCH_RECENT is not set
! # CONFIG_NETFILTER_XT_MATCH_SCTP is not set
! CONFIG_NETFILTER_XT_MATCH_STATE=m
! # CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
! # CONFIG_NETFILTER_XT_MATCH_STRING is not set
! # CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
! # CONFIG_NETFILTER_XT_MATCH_TIME is not set
! # CONFIG_NETFILTER_XT_MATCH_U32 is not set
! # CONFIG_NETFILTER_XT_MATCH_OSF is not set
! # CONFIG_IP_VS is not set
!
! #
! # IP: Netfilter Configuration
! #
! CONFIG_NF_DEFRAG_IPV4=m
! CONFIG_NF_CONNTRACK_IPV4=m
! CONFIG_NF_CONNTRACK_PROC_COMPAT=y
! # CONFIG_IP_NF_QUEUE is not set
! CONFIG_IP_NF_IPTABLES=m
! # CONFIG_IP_NF_MATCH_ADDRTYPE is not set
! # CONFIG_IP_NF_MATCH_AH is not set
! # CONFIG_IP_NF_MATCH_ECN is not set
! # CONFIG_IP_NF_MATCH_TTL is not set
! CONFIG_IP_NF_FILTER=m
! CONFIG_IP_NF_TARGET_REJECT=m
! # CONFIG_IP_NF_TARGET_LOG is not set
! # CONFIG_IP_NF_TARGET_ULOG is not set
! CONFIG_NF_NAT=m
! CONFIG_NF_NAT_NEEDED=y
! CONFIG_IP_NF_TARGET_MASQUERADE=m
! # CONFIG_IP_NF_TARGET_NETMAP is not set
! # CONFIG_IP_NF_TARGET_REDIRECT is not set
! # CONFIG_NF_NAT_SNMP_BASIC is not set
! # CONFIG_NF_NAT_FTP is not set
! # CONFIG_NF_NAT_IRC is not set
! # CONFIG_NF_NAT_TFTP is not set
! # CONFIG_NF_NAT_AMANDA is not set
! # CONFIG_NF_NAT_PPTP is not set
! # CONFIG_NF_NAT_H323 is not set
! # CONFIG_NF_NAT_SIP is not set
! # CONFIG_IP_NF_MANGLE is not set
! # CONFIG_IP_NF_TARGET_TTL is not set
! # CONFIG_IP_NF_RAW is not set
! # CONFIG_IP_NF_ARPTABLES is not set
  # CONFIG_IP_DCCP is not set
  # CONFIG_IP_SCTP is not set
  # CONFIG_TIPC is not set
yasunari@qvl:/usr/src/linux-2.6.31.8$

カーネルのコンパイル

yasunari@qvl:/usr/src/linux-2.6.31.8$ make -j2 uImage
	:
	:
Image Name:   Linux-2.6.31.8
Created:      Thu Jul 26 00:17:58 2012
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    2745192 Bytes = 2680.85 kB = 2.62 MB
Load Address: 0x00008000
Entry Point:  0x00008000
  Image arch/arm/boot/uImage is ready
yasunari@qvl:/usr/src/linux-2.6.31.8$

モジュールのコンパイル

yasunari@qvl:/usr/src/linux-2.6.31.8$ make modules
	:
	:

インストール

yasunari@qvl:/usr/src/linux-2.6.31.8$ sudo rm /boot/uImage.buffalo
[sudo] password for yasunari:
yasunari@qvl:/usr/src/linux-2.6.31.8$ sudo cp arch/arm/boot/uImage /boot/uImage.buffalo
yasunari@qvl:/usr/src/linux-2.6.31.8$ sudo make modules_install
  INSTALL crypto/authenc.ko
	:
	:
  INSTALL net/xfrm/xfrm_user.ko
  DEPMOD  2.6.31.8
yasunari@qvl:/usr/src/linux-2.6.31.8$
実は、試行錯誤で何回も menuconfig ~ modules_install を繰り返したのは 内緒である(笑

リブート

packet forwarding

root@qvl:~# cd /etc/
root@qvl:/etc# mv sysctl.conf{,.orig}
root@qvl:/etc# cp sysctl.conf{.orig,}
root@qvl:/etc# vi sysctl.conf
	:
	:
root@qvl:/etc# !cp:s/cp/diff -u/
diff -u sysctl.conf{.orig,}
--- sysctl.conf.orig    2010-02-25 08:20:09.000000000 +0900
+++ sysctl.conf 2012-07-24 00:26:13.000000000 +0900
@@ -25,7 +25,7 @@
 #net.ipv4.tcp_syncookies=1

 # Uncomment the next line to enable packet forwarding for IPv4
-#net.ipv4.ip_forward=1
+net.ipv4.ip_forward=1

 # Uncomment the next line to enable packet forwarding for IPv6
 #  Enabling this option disables Stateless Address Autoconfiguration
root@qvl:/etc#

デフォルトルートの削除

/etc/network/intercfaces に記述されている 家庭内LAN用のデフォルトルートを消す
root@qvl:/etc# cd /etc/network
root@qvl:/etc/network# vi interfaces
root@qvl:/etc/network# cat interfaces
	:
	:
#       gateway 192.168.2.96
root@qvl:/etc/network#

dnsmasq のインストール

続いて、 dnsmasq のインストール

dnsmasq のインストール

root@qvl:~# apt-get install dnsmasq
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  dnsmasq-base
Suggested packages:
  resolvconf
The following NEW packages will be installed:
  dnsmasq dnsmasq-base
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 321 kB of archives.
After this operation, 860 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org/debian/ squeeze/main dnsmasq-base armel 2.55-2 [307 kB]
Get:2 http://ftp.jp.debian.org/debian/ squeeze/main dnsmasq all 2.55-2 [14.2 kB]
Fetched 321 kB in 1s (304 kB/s)
Selecting previously deselected package dnsmasq-base.
(Reading database ... 15771 files and directories currently installed.)
Unpacking dnsmasq-base (from .../dnsmasq-base_2.55-2_armel.deb) ...
Selecting previously deselected package dnsmasq.
Unpacking dnsmasq (from .../dnsmasq_2.55-2_all.deb) ...
Processing triggers for man-db ...
Setting up dnsmasq-base (2.55-2) ...
Setting up dnsmasq (2.55-2) ...
Starting DNS forwarder and DHCP server: dnsmasq.
!root@qvl:~#

dnsmasq のセットアップ

/etc/dnsmasq.conf を編集する
!root@qvl:~# cd /etc
root@qvl:/etc# mv dnsmasq.conf{,.orig}
root@qvl:/etc# cp dnsmasq.conf{.orig,}
root@qvl:/etc# vi dnsmasq.conf
	:
	:
root@qvl:/etc# !cp:s/cp/diff -u/
diff -u dnsmasq.conf{.orig,}
--- dnsmasq.conf.orig   2010-09-20 05:59:05.000000000 +0900
+++ dnsmasq.conf        2012-07-24 00:35:01.000000000 +0900
@@ -83,6 +83,7 @@
 # interface (eg eth0) here.
 # Repeat the line for more than one interface.
 #interface=
+interface=eth1
 # Or you can specify which interface _not_ to listen on
 #except-interface=
 # Or which to listen on by address (remember to include 127.0.0.1 if
@@ -134,6 +135,7 @@
 # repeat this for each network on which you want to supply DHCP
 # service.
 #dhcp-range=192.168.0.50,192.168.0.150,12h
+dhcp-range=192.168.2.200,192.168.2.220,12h

 # This is an example of a DHCP range where the netmask is given. This
 # is needed for networks we reach the dnsmasq DHCP server via a relay
root@qvl:/etc#
これで、ひと通り準備は整ったか???

動作確認

自宅内LANとは切り離した実験用LANを構築。動作確認する。

再起動

念のため再起動
root@qvl:/etc# reboot

PCを接続

PC を実験用LANに接続する
C:\Documents and Settings\yasunari>ipconfig

Windows IP Configuration

Ethernet adapter ワイヤレス ネットワーク接続:

        Media State . . . . . . . . . . . : Media disconnected

Ethernet adapter ローカル エリア接続:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 192.168.2.205
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.2.56

C:\Documents and Settings\yasunari>
192.168.2.205 が割り当てられた。 Default Gateway も LS-QVL のアドレスである 192.168.2.56。

LS-QVL にログイン


Linux 2.6.31.8 (192.168.2.205) (pts/0)

qvl login: yasunari
Password:
Last login: Mon Jul 23 23:38:02 JST 2012 from x60l.yamasita.jp on pts/0
Linux qvl 2.6.31.8 #2 Mon Jul 23 22:49:11 JST 2012 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
yasunari@qvl:~$ /sbin/ifconfig
eth1      Link encap:Ethernet  HWaddr 4c:e6:76:e7:0f:42
          inet addr:192.168.2.56  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:565 errors:0 dropped:0 overruns:0 frame:0
          TX packets:271 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532
          RX bytes:57384 (56.0 KiB)  TX bytes:25380 (24.7 KiB)
          Interrupt:11

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:200 (200.0 B)  TX bytes:200 (200.0 B)

yasunari@qvl:~$
まだこの時点では、ダイアルアップ接続していない。
yasunari@qvl:~$ cat /etc/resolv.conf
nameserver 192.168.1.2
yasunari@qvl:~$

ダイアルアップ接続

yasunari@qvl:~$ pon em
Error: only members of the 'dip' group can use this command.
yasunari@qvl:~$ su - root
Password:
root@qvl:~# pon em
root@qvl:~#
D02HW の LED が青点灯した時点で、各種確認。
root@qvl:~# ifconfig
eth1      Link encap:Ethernet  HWaddr 4c:e6:76:e7:0f:42
          inet addr:192.168.2.56  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:828 errors:0 dropped:0 overruns:0 frame:0
          TX packets:417 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532
          RX bytes:79559 (77.6 KiB)  TX bytes:36684 (35.8 KiB)
          Interrupt:11

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:200 (200.0 B)  TX bytes:200 (200.0 B)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:10.98.87.184  P-t-P:10.64.64.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:1737 (1.6 KiB)  TX bytes:2162 (2.1 KiB)

root@qvl:~# cat /etc/resolv.conf
nameserver 60.254.193.158
nameserver 117.55.64.154
root@qvl:~# ping yahoo.co.jp
PING yahoo.co.jp (203.216.243.240) 56(84) bytes of data.
64 bytes from f11.top.vip.tnz.yahoo.co.jp (203.216.243.240): icmp_req=1 ttl=55 time=559 ms
64 bytes from f11.top.vip.tnz.yahoo.co.jp (203.216.243.240): icmp_req=2 ttl=55 time=519 ms
64 bytes from f11.top.vip.tnz.yahoo.co.jp (203.216.243.240): icmp_req=3 ttl=55 time=470 ms
64 bytes from f11.top.vip.tnz.yahoo.co.jp (203.216.243.240): icmp_req=4 ttl=55 time=439 ms
^C
--- yahoo.co.jp ping statistics ---
5 packets transmitted, 4 received, 20% packet loss, time 4378ms
rtt min/avg/max/mdev = 439.884/497.299/559.513/45.877 ms
root@qvl:~#
LS-QVL からのアクセスはうまく行っていそう。
PC からもアクセスしてみる
C:\Windows\system32>ping yahoo.co.jp

yahoo.co.jp [124.83.187.140]に ping を送信しています 32 バイトのデータ:
124.83.187.140 からの応答: バイト数 =32 時間 =276ms TTL=52
124.83.187.140 からの応答: バイト数 =32 時間 =269ms TTL=52

124.83.187.140 の ping 統計:
    パケット数: 送信 = 2、受信 = 2、損失 = 0 (0% の損失)、
ラウンド トリップの概算時間 (ミリ秒):
    最小 = 269ms、最大 = 276ms、平均 = 272ms
Ctrl+C
^C
C:\Windows\system32>
オープンソースカンファレンス 2012 Kansai@Kyotoに なんとか間に合いそう。ふー、危ない危ない

LS-QVL
バッファローダイレクト
楽天市場
amazon
ドスパラ
livedoor デパート
Yahoo!ショッピング
バリューモア
ムラウチドットコム


ダイアルアップサーバ(2)PPP で接続
ハックの記録
LinkStation/玄箱 をハックしよう

OSC 2012 Kansai @ Kyoto 展示環境 #osckansai

ツイート Tweet to @yasunari_y @yasunari_yをフォロー

Copyright (C) 2003-2012 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市