vmware 에 centos 설치후 host os 에서 접근 관련 질문입니다.
글쓴이: nmccm / 작성시간: 월, 2012/09/10 - 1:36오후
host os : window 7 professional K (64bit)
guest os : centos 6.x (32bit)
vmware : 8.0.4
vmware 를 설치한후 centos 또한 잘 설치했습니다.
host os ip 는 iptime 무선 공유기를 사용하여 192.168.1.3 을 사용중입니다.
guest os ip 는 192.168.20.128 입니다.
그림으로 모든걸 캡쳐했습니다.
192.169.1.3:9998 로 접속시엔 제대로 guest os 의 ssh 로 접속이 됩니다만 익스플로러에서 http://192.168.1.3:9997 로 접속시엔 guest os 의 apache 기본 화면을 볼수가 없네요..
문제가 뭘까요.. 취미 삼아 하는게 아닌. 업무상 필요해서 꼭 설정해야합니다.
도움 부탁드립니다...
File attachments:
Forums:
혹시 iptables 확인하셨나요?
service iptables status
실제로 guest 에선 8008 포트에 apache가 붙어있는것 같은데요.
8008 포트가 외부에서 접근 가능한 상태인가요?
iptable ......
우선 답변 감사합니다.
iptable 는 특별히 설정해 둔것이 없습니다. 보통 이럴땐 selinux 만 내리면 원격 접근이 되는걸로 알고 있습니다. 아래는 움 주신 명령어로 실행해본 결과입니다.
[root@localhost ~]# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
5 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
1 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
[root@localhost ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
물론 disabled 설정후 재부팅 하였습니다.
iptables 설정 문제였네요 ㅠ.ㅠ
룰을 하나 8008 룰을 추가했더니 성공했습니다. 감사합니다. ㅠ.ㅠ
[root@localhost ~]# vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8008 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
해결되었다니 다행입니다.
그럼 수고하세요 :)
댓글 달기