IP masquerading 질문입니다 -_-
글쓴이: urmajest / 작성시간: 월, 2003/06/23 - 7:01오전
IP masquerading 질문하는 건 참 싫었는데 -_- 안되니 할 수 없군요
초보에게 도움을 주시면 감사하겠습니다 ^^
리눅스는 젠투(버젼은 기억나지 않는데 최신이군요 -_-)입니다.
필요한 모듈은 insmod로 잘 올려진 것 같네요
Module Size Used by Not tainted ipt_MASQUERADE 1496 1 (autoclean) iptable_filter 1740 1 (autoclean) ip_nat_ftp 3408 0 (unused) iptable_nat 18520 2 [ipt_MASQUERADE ip_nat_ftp] ip_conntrack_ftp 4432 1 ip_conntrack 22528 2 [ipt_MASQUERADE ip_nat_ftp iptable_nat ip_conntrack_ftp] ip_tables 12768 5 [ipt_MASQUERADE iptable_filter iptable_nat]
구성은 아래와 같습니다
linux windows eth0:192.168.0.1 eth1:192.168.1.1 <-------> 192.168.1.2 ppp0:adsl
linux에서 인터넷 잘 되구요, 윈도에서 eth0,1 ppp0 로 핑 잘 나가네요
역으로도 잘 되구요
윈도우로 멀티부팅 했을 때나, 예전에 래드햇 사용했을 때에는
잘 되었던 구성이라, 구성에는 문제가 없는 듯해요
그런데 역시나 클라이언트(192.168.1.2) 쪽에서 외부로 핑이 안 되네요
왜그럴까요? -_-
아래는 iptables -t nat -L 했을 때의 화면입니다
Chain PREROUTING (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source destination MASQUERADE all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination
아래는 iptables -L 했을 때의 화면입니다
Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination
아래는 netstat -rn입니다 -_-
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 211.216.20.1 0.0.0.0 255.255.255.255 UH 40 0 0 ppp0 192.168.1.0 0.0.0.0 255.255.255.0 U 40 0 0 eth1 192.168.0.0 0.0.0.0 255.255.255.0 U 40 0 0 eth0 0.0.0.0 211.216.20.1 0.0.0.0 UG 40 0 0 ppp0
/sbin/depmod -a /sbin/insmod ip_tables /sbin/insmod ip_conntrack /sbin/insmod ip_conntrack_ftp /sbin/insmod iptable_nat /sbin/insmod ip_nat_ftp echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
처음엔 위처럼 설정해줬는데 안 되길래
iptables -P INPUT ACCEPT iptables -F INPUT iptables -P OUTPUT ACCEPT iptables -F OUTPUT iptables -P FORWARD ACCEPT iptables -F FORWARD
를 붙였는데 그래도 안 되네요 -_-
도와주세요~
Forums:
몇군데 빼먹은건 아닐런지....
저같은 경우는 사내망에서 컴터 2대를 마스커레이딩으로 공유하는데
이렇게 되어 있습니다. (모듈 안쓰고 커널에 몽땅 집어넣음)
잘 돕니다
iptables -L의 INPUT란 끝 2개는 FTP를 위해 열어둔겁니다
Written By the Black Knight of Destruction
댓글 달기