>> Delete No. 43124 article
No. IP 매스커레이딩 성공하신 분?

등록 2002-02-23 02:38:00 By localhost     조회 3
이름 로리투    

예전에 이문제로 올렸는데.. 그 물음에는 여전히 답이 없네요..
지금상황도 마찬가지인데요.. 리눅스서버(Red7.2)에는 RTL8139
랜카드 모듈(8139too) 두개가 잡혀 있고 lsmod시 iptables과 함께  정상적으로 나옵니다.
 물론 iptables은 rc.local에 두줄 정상 추가했고요..
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
 문제는 routig table 확인시 eth1의 GW가 잡혀야 되는데..
아래처럼 DHCP로 부터 받은것만 나오네요..
이러면 리눅스 서버에서 외부핑은 되지만 클라이언트쪽 win2k에서
는 인터넷이 안되죠........
[root@BJ_Server xinetd.d]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth1
61.248.14.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         61.248.14.1     0.0.0.0         UG    0      0        0 eth0
 그래서 수동으로 route add default gw 192.168.1.1 dev eth1를 주면
route 명령시 잡히지만 이땐 외부 핑이 안되는거죠..
[root@BJ_Server xinetd.d]# route add default gw 192.168.1.1 dev eth1
[root@BJ_Server xinetd.d]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth1
61.248.14.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         BJ_Server.linux 0.0.0.0         UG    0      0        0 eth1
default         61.248.14.1     0.0.0.0         UG    0      0        0 eth0
[root@BJ_Server xinetd.d]# ping yahoo.co.kr
 그래서 다시 network restart하면  수동으로 잡은 eth1의 GW는 사라지고 외부핑은 되죠...
[root@BJ_Server xinetd.d]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth1
61.248.14.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         61.248.14.1     0.0.0.0         UG    0      0        0 eth0
 제가 설정한 네트웍 환경파일 내용입니다. 위 아래 쭉 살펴보시고 고수님들의 통쾌한 답
변 부탁드립니다........... ^^;  [/etc/sysconfig/network]
NETWORKING=yes
HOSTNAME=BJ_Server.linux.net
DOMAINNAME=linux.net
FORWARD_IPV4=yes
GATEWAYDEV=eth1
GATEWAY=192.168.1.1
 [/etc/sysconfig/network-scripts/ifcfg-eth0]
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
 [/etc/sysconfig/network-scripts/ifcfg-eth1]
DEVICE=eth1
IPADDR=192.168.1.1
NETMASK=255.255.255.0
BROADCAST=192.168.1.255
ONBOOT=yes
BOOTPROTO=none
 [/etc/hosts]
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
192.168.1.1             BJ_Server.linux.net BJ_Server
192.168.1.2             win.linux.net win
[관리자] 패스워드를 입력 하십시오. 답장이 존재하면 함께 삭제됩니다.[ 목록 | 이전 ]
패스워드:    

Copyleft 1999-2026 by JSBoard Open Project
Theme Designed by IDOO All right reserved