重启前,看看 iptables 是否被设置了
由于不知道是什么发行版,是怎么设置的脚本,看一下 /etc/issue 看有什么线索。
root@LinuxDev:/# cat /etc/issue
Ubuntu karmic (development branch) \n \l
root@LinuxDev:/#
Ubuntu karmic (development branch) \n \l
root@LinuxDev:/#
原来是 Ubuntu……
查看一下 /etc/init/iptables.conf
root@localhost:/# cat /etc/init/iptables.conf
# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# iptables
#
start on login-prompt-ready
# This is run-once rather than a service.
task
script
/sbin/iptables -P INPUT DROP
/sbin/iptables -P FORWARD DROP
/sbin/iptables -P OUTPUT DROP
# Accept everything on the loopback
/sbin/iptables -I INPUT -i lo -j ACCEPT
/sbin/iptables -I OUTPUT -o lo -j ACCEPT
# Accept return traffic inbound
/sbin/iptables -I INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# ssh
/sbin/iptables -A INPUT -p tcp --dport 22 -j ACCEPT
# Accept new and return traffic outbound
/sbin/iptables -I OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
end script
root@localhost:/#
# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# iptables
#
start on login-prompt-ready
# This is run-once rather than a service.
task
script
/sbin/iptables -P INPUT DROP
/sbin/iptables -P FORWARD DROP
/sbin/iptables -P OUTPUT DROP
# Accept everything on the loopback
/sbin/iptables -I INPUT -i lo -j ACCEPT
/sbin/iptables -I OUTPUT -o lo -j ACCEPT
# Accept return traffic inbound
/sbin/iptables -I INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# ssh
/sbin/iptables -A INPUT -p tcp --dport 22 -j ACCEPT
# Accept new and return traffic outbound
/sbin/iptables -I OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
end script
root@localhost:/#
果不其然,怪不得无法 ping 通呢,都是 DROP,全都把默认改成 ACCEPT。
关闭目前的 VMWare,启动 Chromium OS,启动后按 Ctrl + Alt + t 进入 terminal 模式(如图)su 到 platinum,启动 ssh,通过 ssh 远程用 platinum 账号登录,得到提示。
QUOTE:
login as: platinum
platinum@172.17.40.102's password: ********
Linux localhost 2.6.30-chromeos-intel-menlow #1 SMP Fri Nov 20 00:03:08 UTC 2009 i686
To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
Could not chdir to home directory /home/platinum: No such file or directory
root@localhost:/#
platinum@172.17.40.102's password: ********
Linux localhost 2.6.30-chromeos-intel-menlow #1 SMP Fri Nov 20 00:03:08 UTC 2009 i686
To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
Could not chdir to home directory /home/platinum: No such file or directory
root@localhost:/#
看看启动参数
QUOTE:
root@localhost:/home/chronos# cat /boot/extlinux.conf
DEFAULT chromeos-usb
PROMPT 0
TIMEOUT 0
label chromeos-usb
menu label chromeos-usb
kernel vmlinuz
append quiet console=tty2 initrd=initrd.img init=/sbin/init boot=local rootwait root=LABEL=C-ROOT ro noresume noswap i915.modeset=1 loglevel=1
label chromeos-hd
menu label chromeos-hd
kernel vmlinuz
append quiet console=tty2 init=/sbin/init boot=local rootwait root=HDROOT ro noresume noswap i915.modeset=1 loglevel=1
root@localhost:/home/chronos#
DEFAULT chromeos-usb
PROMPT 0
TIMEOUT 0
label chromeos-usb
menu label chromeos-usb
kernel vmlinuz
append quiet console=tty2 initrd=initrd.img init=/sbin/init boot=local rootwait root=LABEL=C-ROOT ro noresume noswap i915.modeset=1 loglevel=1
label chromeos-hd
menu label chromeos-hd
kernel vmlinuz
append quiet console=tty2 init=/sbin/init boot=local rootwait root=HDROOT ro noresume noswap i915.modeset=1 loglevel=1
root@localhost:/home/chronos#
看看映射结构
QUOTE:
QUOTE:
root@localhost:/# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 957496 603088 305768 67% /
udev 255548 169284 86264 67% /dev
/dev/disk/by-label/C-ROOT
957496 603088 305768 67% /
/tmp 255548 8 255540 1% /tmp
shmfs 255548 140 255408 1% /dev/shm
/dev/sda1 957496 80328 828528 9% /mnt/stateful_partition
/dev/sda1 957496 80328 828528 9% /var/cache
/dev/sda1 957496 80328 828528 9% /var/log
vartmp 255548 20 255528 1% /var/tmp
/dev/sda1 957496 80328 828528 9% /home
varrun 255548 56 255492 1% /var/run
varlock 255548 0 255548 0% /var/lock
/media 255548 0 255548 0% /media
/dev/mapper/cryptohome
811972 36088 740900 5% /home/chronos
root@localhost:/# mount
rootfs on / type rootfs (rw)
none on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
none on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type tmpfs (rw,relatime,mode=755)
none on /dev/.bootchart/proc type proc (rw,relatime)
/dev/disk/by-label/C-ROOT on / type ext3 (ro,relatime,errors=continue,data=writeback)
/tmp on /tmp type tmpfs (rw,relatime)
shmfs on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
/dev/sda1 on /mnt/stateful_partition type ext3 (rw,relatime,errors=continue,data=writeback)
/dev/sda1 on /var/cache type ext3 (rw,relatime,errors=continue,data=writeback)
/dev/sda1 on /var/log type ext3 (rw,relatime,errors=continue,data=writeback)
vartmp on /var/tmp type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /home type ext3 (rw,relatime,errors=continue,data=writeback)
varrun on /var/run type tmpfs (rw,nosuid,relatime,mode=755)
varlock on /var/lock type tmpfs (rw,nosuid,nodev,noexec,relatime)
/media on /media type tmpfs (rw,relatime)
/dev/mapper/cryptohome on /home/chronos type ext4 (rw,nosuid,nodev,noexec,relatime,barrier=1,data=ordered)
root@localhost:/#
root@localhost:/# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 957496 603088 305768 67% /
udev 255548 169284 86264 67% /dev
/dev/disk/by-label/C-ROOT
957496 603088 305768 67% /
/tmp 255548 8 255540 1% /tmp
shmfs 255548 140 255408 1% /dev/shm
/dev/sda1 957496 80328 828528 9% /mnt/stateful_partition
/dev/sda1 957496 80328 828528 9% /var/cache
/dev/sda1 957496 80328 828528 9% /var/log
vartmp 255548 20 255528 1% /var/tmp
/dev/sda1 957496 80328 828528 9% /home
varrun 255548 56 255492 1% /var/run
varlock 255548 0 255548 0% /var/lock
/media 255548 0 255548 0% /media
/dev/mapper/cryptohome
811972 36088 740900 5% /home/chronos
root@localhost:/# mount
rootfs on / type rootfs (rw)
none on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
none on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type tmpfs (rw,relatime,mode=755)
none on /dev/.bootchart/proc type proc (rw,relatime)
/dev/disk/by-label/C-ROOT on / type ext3 (ro,relatime,errors=continue,data=writeback)
/tmp on /tmp type tmpfs (rw,relatime)
shmfs on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
/dev/sda1 on /mnt/stateful_partition type ext3 (rw,relatime,errors=continue,data=writeback)
/dev/sda1 on /var/cache type ext3 (rw,relatime,errors=continue,data=writeback)
/dev/sda1 on /var/log type ext3 (rw,relatime,errors=continue,data=writeback)
vartmp on /var/tmp type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /home type ext3 (rw,relatime,errors=continue,data=writeback)
varrun on /var/run type tmpfs (rw,nosuid,relatime,mode=755)
varlock on /var/lock type tmpfs (rw,nosuid,nodev,noexec,relatime)
/media on /media type tmpfs (rw,relatime)
/dev/mapper/cryptohome on /home/chronos type ext4 (rw,nosuid,nodev,noexec,relatime,barrier=1,data=ordered)
root@localhost:/#