리눅스 분류
리눅스 설치후 외부접속이 되질 않습니다.
작성자 정보
- ci5ns 작성
- 작성일
컨텐츠 정보
- 3,337 조회
- 1 댓글
- 0 추천
- 목록
본문
현 상황은 이렇습니다.
공유기 한대로 pc 두대를 물려사용중이며
한대는 xp를 깔아 사용중이며 또 한대는 linux를 깔았습니다.
아래 에서는 xp를 PC1, linux를 PC2로 설명하도록 하겠습니다.
문제는 PC2에 linux 설치한후 ftp, ssh, http 등 접속이 외부에서는 안되고 있습니다.
내부 즉 PC1에서 PC2의 IP(192.168.0.5)로 접속을 하면 ssh, http등 접속이 되고 있습니다.
그러나 PC1에서 211.52.218.6 으로 접속을 해보면 ssh, httpd등 전혀 접속이 되질 않습니다.
위 결과로 볼때 인터넷연결, 서비스 실행, 방화벽 문제는 아닌듯 싶습니다.
공유기 설정 문제인듯하여 DMZ를 PC2로 설정을 해보았으나
역시 접속은 되질 않습니다.
그래서 인터넷업체에서 포트를 막아놓았나 하였으나,
PC1에 윈도우 apm를 설치후
DMZ를 PC1로 설정하니 http://211.52.218.6 접속시 잘 됩니다..
이제 여기서 미궁에 빠졌습니다.
위결과로 보았을때
공유기 설정문제도아니며
서비스 설정문제도 아니며
인터넷 연결문제도 아니며
포트문제도 아니라는결론이 나왔으나
외부접속은 여전히 되질 않습니다.
한가지 의심되는것은 PC1과 PC2간의 인터넷 연결은 잘 되나
# ping kr.yahoo.com 했을시 아래와 같이 핑을 잡지 못합니다 --;;;
PING kr.home.yahoo4.akadns.net (211.115.101.150) 56(84) bytes of data.
From 192.168.0.5 icmp_seq=1 Destination Host Unreachable
From 192.168.0.5 icmp_seq=2 Destination Host Unreachable
From 192.168.0.5 icmp_seq=3 Destination Host Unreachable
From 192.168.0.5 icmp_seq=5 Destination Host Unreachable
위 내용을 참고하셔서 조언부탁드리겠습니다. ㅠ
아래내용들은 PC2의 설정상태 입니다.
/*-------------------- iptabels -L ---------------------------------*/
[root@localhost conf]# /sbin/iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Firewall-1-INPUT (0 references)
target prot opt source destination
/*-------------------- iptabels -L ---------------------------------*/
/*-------------------- ifconfig -------------------------------------*/
[root@localhost conf]# /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:E0:4C:8B:03:EB
inet addr:192.168.0.5 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:4cff:fe8b:3eb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21805 errors:0 dropped:0 overruns:0 frame:0
TX packets:20320 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1952831 (1.8 MiB) TX bytes:3150262 (3.0 MiB)
Interrupt:11 Base address:0x6000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:7467 errors:0 dropped:0 overruns:0 frame:0
TX packets:7467 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:411986 (402.3 KiB) TX bytes:411986 (402.3 KiB)
/*-------------------- ifconfig -------------------------------------*/
/*-------------------- netstat -anp -------------------------------------*/
[root@localhost conf]# netstat -anp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 6457/mysqld
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 27237/xinetd
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 6462/httpd
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 2284/vsftpd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 2302/sendmail: acce
tcp 0 0 :::22 :::* LISTEN 2265/sshd
tcp 0 0 ::ffff:192.168.0.5:22 ::ffff:192.168.0.3:4518 ESTABLISHED 26950/sshd: ci5ns [
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 151583 6457/mysqld /tmp/mysql.sock
unix 8 [ ] DGRAM 4777 2213/syslogd /dev/log
unix 2 [ ] DGRAM 2670 1299/udevd @udevd
unix 2 [ ACC ] STREAM LISTENING 5071 2329/saslauthd /var/run/saslauthd/mux
unix 2 [ ] DGRAM 163604 10091/netstat
unix 2 [ ] DGRAM 90397 27237/xinetd
unix 3 [ ] STREAM CONNECTED 88653 26950/sshd: ci5ns [
unix 3 [ ] STREAM CONNECTED 88652 26952/2
unix 2 [ ] DGRAM 5070 2329/saslauthd
unix 2 [ ] DGRAM 5051 2320/crond
unix 2 [ ] DGRAM 5035 2310/clientmqueue
unix 2 [ ] DGRAM 5016 2302/sendmail: acce
unix 2 [ ] DGRAM 4785 2217/klogd
/*-------------------- netstat -anp -------------------------------------*/
/*-------------------- route -------------------------------------*/
[root@localhost conf]# /sbin/route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default 192.168.0.254 0.0.0.0 UG 0 0 0 eth0
/*-------------------- route -------------------------------------*/
/*-------------------- nmap -sT localhost -------------------------------------*/
[root@localhost conf]# nmap -sT localhost
Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2007-09-06 04:15 KST
Interesting ports on localhost.localdomain (127.0.0.1):
(The 1654 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
80/tcp open http
110/tcp open pop3
3306/tcp open mysql
Nmap run completed -- 1 IP address (1 host up) scanned in 0.325 seconds
/*-------------------- nmap -sT localhost -------------------------------------*/
공유기 한대로 pc 두대를 물려사용중이며
한대는 xp를 깔아 사용중이며 또 한대는 linux를 깔았습니다.
아래 에서는 xp를 PC1, linux를 PC2로 설명하도록 하겠습니다.
문제는 PC2에 linux 설치한후 ftp, ssh, http 등 접속이 외부에서는 안되고 있습니다.
내부 즉 PC1에서 PC2의 IP(192.168.0.5)로 접속을 하면 ssh, http등 접속이 되고 있습니다.
그러나 PC1에서 211.52.218.6 으로 접속을 해보면 ssh, httpd등 전혀 접속이 되질 않습니다.
위 결과로 볼때 인터넷연결, 서비스 실행, 방화벽 문제는 아닌듯 싶습니다.
공유기 설정 문제인듯하여 DMZ를 PC2로 설정을 해보았으나
역시 접속은 되질 않습니다.
그래서 인터넷업체에서 포트를 막아놓았나 하였으나,
PC1에 윈도우 apm를 설치후
DMZ를 PC1로 설정하니 http://211.52.218.6 접속시 잘 됩니다..
이제 여기서 미궁에 빠졌습니다.
위결과로 보았을때
공유기 설정문제도아니며
서비스 설정문제도 아니며
인터넷 연결문제도 아니며
포트문제도 아니라는결론이 나왔으나
외부접속은 여전히 되질 않습니다.
한가지 의심되는것은 PC1과 PC2간의 인터넷 연결은 잘 되나
# ping kr.yahoo.com 했을시 아래와 같이 핑을 잡지 못합니다 --;;;
PING kr.home.yahoo4.akadns.net (211.115.101.150) 56(84) bytes of data.
From 192.168.0.5 icmp_seq=1 Destination Host Unreachable
From 192.168.0.5 icmp_seq=2 Destination Host Unreachable
From 192.168.0.5 icmp_seq=3 Destination Host Unreachable
From 192.168.0.5 icmp_seq=5 Destination Host Unreachable
위 내용을 참고하셔서 조언부탁드리겠습니다. ㅠ
아래내용들은 PC2의 설정상태 입니다.
/*-------------------- iptabels -L ---------------------------------*/
[root@localhost conf]# /sbin/iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Firewall-1-INPUT (0 references)
target prot opt source destination
/*-------------------- iptabels -L ---------------------------------*/
/*-------------------- ifconfig -------------------------------------*/
[root@localhost conf]# /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:E0:4C:8B:03:EB
inet addr:192.168.0.5 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:4cff:fe8b:3eb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21805 errors:0 dropped:0 overruns:0 frame:0
TX packets:20320 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1952831 (1.8 MiB) TX bytes:3150262 (3.0 MiB)
Interrupt:11 Base address:0x6000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:7467 errors:0 dropped:0 overruns:0 frame:0
TX packets:7467 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:411986 (402.3 KiB) TX bytes:411986 (402.3 KiB)
/*-------------------- ifconfig -------------------------------------*/
/*-------------------- netstat -anp -------------------------------------*/
[root@localhost conf]# netstat -anp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 6457/mysqld
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 27237/xinetd
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 6462/httpd
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 2284/vsftpd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 2302/sendmail: acce
tcp 0 0 :::22 :::* LISTEN 2265/sshd
tcp 0 0 ::ffff:192.168.0.5:22 ::ffff:192.168.0.3:4518 ESTABLISHED 26950/sshd: ci5ns [
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 151583 6457/mysqld /tmp/mysql.sock
unix 8 [ ] DGRAM 4777 2213/syslogd /dev/log
unix 2 [ ] DGRAM 2670 1299/udevd @udevd
unix 2 [ ACC ] STREAM LISTENING 5071 2329/saslauthd /var/run/saslauthd/mux
unix 2 [ ] DGRAM 163604 10091/netstat
unix 2 [ ] DGRAM 90397 27237/xinetd
unix 3 [ ] STREAM CONNECTED 88653 26950/sshd: ci5ns [
unix 3 [ ] STREAM CONNECTED 88652 26952/2
unix 2 [ ] DGRAM 5070 2329/saslauthd
unix 2 [ ] DGRAM 5051 2320/crond
unix 2 [ ] DGRAM 5035 2310/clientmqueue
unix 2 [ ] DGRAM 5016 2302/sendmail: acce
unix 2 [ ] DGRAM 4785 2217/klogd
/*-------------------- netstat -anp -------------------------------------*/
/*-------------------- route -------------------------------------*/
[root@localhost conf]# /sbin/route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default 192.168.0.254 0.0.0.0 UG 0 0 0 eth0
/*-------------------- route -------------------------------------*/
/*-------------------- nmap -sT localhost -------------------------------------*/
[root@localhost conf]# nmap -sT localhost
Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2007-09-06 04:15 KST
Interesting ports on localhost.localdomain (127.0.0.1):
(The 1654 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
80/tcp open http
110/tcp open pop3
3306/tcp open mysql
Nmap run completed -- 1 IP address (1 host up) scanned in 0.325 seconds
/*-------------------- nmap -sT localhost -------------------------------------*/
관련자료
-
이전
-
다음
댓글 1
이창목님의 댓글
- 이창목
- 작성일
게이트웨이로 핑먼저 확인후 응답이 없다면 이더넷 카드가 혹시 다른곳에 꽂혀 있는지 확이해보시죠
저도 가끔 그런실수를...
저도 가끔 그런실수를...