>> Read No. 708 article  
[하늘]아이피마스커레이팅 무작정 따라하기

등록 2000-09-11 02:03:00     조회 5
이름 하늘    

		아이피마스커레이팅 무작정 따라하기
 1. 개요
아이피마스커래이팅(이하:ipmasq)이란 pc한대가 받은 아이피를 여러대가 공
유한는 것이다.
요금처럼 초고속망이 유행하는 환경에서 집이나 작은 사무실에 여러대가 사
용하기에 참 적합한 방식이다.
 테스트환경:
전용선:보라홈넷2형(HDSL)
pc: 1. MMX 166 램16 하드500 X 2- 서버
    2. K6 300 - 클라이언트
    3. pentiumII400 - 클라이언트
랜: 랜카드 4 (pc갯수 +1)(3com Etherlink 905b 10/100 2개, Realtek
10/100 2개)
    허브 1
    케이블 4 (pc갯수 +1)
os: 1. 리눅스(Allix,상관없음)
    2. 윈도95
    3. 윈도ME
 2. 설치
pc두대는 그대로 두고, 서버로 사용할pc에는 linux를 설치한다.
기본적인 것만 설치해두 된다.. 잘모르겠더든
리눅스 전체를 설치한다.(한 700-800메가정도 된다.)
3com랜카드만 꼽은채로 설치를 한다.
3Com랜카드는 자동으로 잡히므로 고민할것없다.
ip설정은 DHCP로 한다.
나중에 Realtek를 추가하면, allix의경우 자동으로 설치되며
그렇지 않으면, 제공하는 드라이버디스크로 손쉽게 추가할수 있다.
ip는 내부아이피로 설정을 하면된다. - 설정부분에서 다시 다룸.
 3. 장비의 설치
외부에서 들어오는 전용선은 3com으로 연결한다.
리얼택 랜카드에 케이블을 연결해서 허브에 연결한다.
나머지 클라이언트 두대의 pc에 꼽은 랜카드도 허브로 연결한다.
               +---------------------+       +------+
             :       서버pc        :       :      :
전용선  -----+랜카드         랜카드+-------+      :
             :                     :  +----+ 허브 :
             +---------------------+  :  +-+      :
                                      :  : :      :
             +-------------+          :  : +------+       +------------
+
             :  pc1        :          :  :                :     
pc1  :
             :       랜카드+----------+  +----------------+랜카
드      :
             :             :                              :           
:
             +-------------+                              +------------
+
                                 <구성도>
 4. 설정
리눅스에서는 3Com은 DHCP를 이용하므로 손댈곳이 없다.
다만 Realtek부분에서 설정을 잡는다.
사설아이피류의 아무것이나 설정하면 된다.
192.168.0.1로 설정한다. 서브넷은 255.255.emoticon이 된다.
나머지는 잡지 않아도 된다.
 호스트 파일을 편집한다.
 /etc/hosts에 5번에서 준 임의의 호스트 이름(pc1,pc2)를 추가한다.
......(원래 있는 그대로)
192.168.0.2 pc1
192.168.0.3 pc2
 그다음에 /etc/rc.d/rc.local화일끝에
exec /etc/rc.d/rc.firewall 를 추가한다.
 그리고, /etc/rc.d/rc.firewall을 넣는다. 아래와같이 적어 넣어도 된다.
###################################################################
#!/bin/sh
#
# rc.firewall - Initial SIMPLE IP Masquerade test for 2.1.x and 2.2.x
kernels us
ing IPCHAINS
#
# Load all required IP MASQ modules
#
#   NOTE:  Only load the IP MASQ modules you need.  All current IP
MASQ modules
#          are shown below but are commented out from loading.
 # Needed to initially load modules
#
/sbin/depmod -a
 # Supports the proper masquerading of FTP file transfers using the
PORT method
#
/sbin/modprobe ip_masq_ftp
 # Supports the masquerading of RealAudio over UDP.  Without this
module,
#       RealAudio WILL function but in TCP mode.  This can cause a
reduction
#       in sound quality
#
#/sbin/modprobe ip_masq_raudio
 # Supports the masquerading of IRC DCC file transfers
#
#/sbin/modprobe ip_masq_irc
  # Supports the masquerading of Quake and QuakeWorld by default.  This
modules is
#   for for multiple users behind the Linux MASQ server.  If you are
going to pl
ay
#   Quake I, II, and III, use the second example.
#
#Quake I / QuakeWorld (ports 26000 and 27000)
#/sbin/modprobe ip_masq_quake
#
#Quake I/II/III / QuakeWorld (ports 26000, 27000, 27910, 27960)
#/sbin/modprobe ip_masq_quake ports=26000,27000,27910,27960
  # Supports the masquerading of the CuSeeme video conferencing software
#
#/sbin/modprobe ip_masq_cuseeme
 #Supports the masquerading of the VDO-live video conferencing software
#
#/sbin/modprobe ip_masq_vdolive
  #CRITICAL:  Enable IP forwarding since it is disabled by default since
#
#           Redhat Users:  you may try changing the options
in /etc/sysconfig/ne
twork from:
#
#                       FORWARD_IPV4=false
#                             to
#                       FORWARD_IPV4=true
#
echo "1" > /proc/sys/net/ipv4/ip_forward
  # Dynamic IP users:
#
#   If you get your IP address dynamically from SLIP, PPP, or DHCP,
enable this
following
#       option.  This enables dynamic-ip address hacking in IP MASQ,
making the
life
#       with Diald and similar programs much easier.
#
#echo "1" > /proc/sys/net/ipv4/ip_dynaddr
  # MASQ timeouts
#
#   2 hrs timeout for TCP session timeouts
#  10 sec timeout for traffic after the TCP/IP "FIN" packet is received
#  160 sec timeout for UDP traffic (Important for MASQ'ed ICQ users)
#
/sbin/ipchains -M -S 7200 10 160
  # DHCP:  For people who receive their external IP address from either
DHCP or BO
OTP
#        such as ADSL or Cablemodem users, it is necessary to use the
following
#        before the deny command.  The "bootp_client_net_if_name"
should be repl
aced
#        the name of the link that the DHCP/BOOTP server will put an
address on
to?
#        This will be something like "eth0", "eth1", etc.
#
#        This example is currently commented out.
#
#
#/sbin/ipchains -A input -j ACCEPT -i bootp_clients_net_if_name -s 0/0
67 -d 0/0
68 -p udp
 # Enable simple IP forwarding and Masquerading
#
#  NOTE:  The following is an example for an internal LAN address in
the 192.16
8.0.x
#         network with a 255.255.255.0 or a "24" bit subnet mask.
#
#         Please change this network number and subnet mask to match
your intern
al LAN setup
#
/sbin/ipchains -P forward DENY
/sbin/ipchains -A forward -s 192.168.0.1/24 -j MASQ
#######################################################################
 그리구 나서 화일의 퍼미션을 바꿔준다.
모두 755 이다.
 예) chmod rc.firewall 755
 5. 클라이언트pc의 설정
랜카드들은 대체적으로 자동으로 잡히므로 생략한다.
제어판의 네트워크를 열어서 "tcp/ip --> (랜카드이름)"의 등록정보를 연다.
ip를 192.168.0.2로 적고, 서브넷은 255.255.emoticon으로 설정한다.
게이트웨이는 192.168.0.1로 지정한다.
DNS탭에서 찾을dns를 192.168.0.1를 적고 추가한다.
호스트는 임의의 이름을 준다.(추천:pc1)
다른한대는 ip를 192.168.0.3으로 적고 호스트를 임의의 이름으로 준다.(추
천:pc2)
 모든 설정이 끝났다.. 이제 리눅스를 리부트 하고
pc들도 리부트 한다.
각 pc들에서 접속을 해본다.
 6. 문제해결
접속이 안되면
클라이언트pc들에서 접속이 안되면, 우선pc들의 랜카드가 잡혔나 확인한다.
잡혔다면, pc뒷면에서 랜카드 불이 들어왔나 확인한다.
허브측에 불이 들어왔나 확인한다.
서버의 랜카드역시 확인한다. 허브까지
처음 부팅할때
eth0 와 eth1이 ok로 뜨는지 확인한다.
모든것이 정상이면
클라이언트 pc --> 서버pc 로 ping해보고
서버에서 해당isp로 ping해본다.
서버에서 인터넷 가능여부도 체크해본다.
 그래도 안되면 Q/A란에 질문해주세요~~~--하늘/sky0 at netscape.net
이름
암호
  목록보기 윗글 아랫글
글쓰기
답장쓰기 수정 삭제
정규표현식 [ 상세 검색 ]
페이지로딩: [ 0.36 초 ] 작업시간: [ 0.04 초 ]

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

적수네 동네
+
| 적수네 동네
| 공부방
| 리눅스 잡지 서고
| LSN 소스
| 링크 모음
+---+
게시판
+
| 떠들어보세!
| 질문과 답변
| 새소식과 정보
| 1원짜리 팁?
| 대화방
+---+
칼럼?
+
| 세하 훔쳐보기
| Welcome2nite
| 혜진의 염장판
+---+
리눅스 상표권
+
| 반대 서명란
| 토론 게시판
+---+
GNU
+
| GNU 선언문
| GNU GPL
| GNU 미러 목록
+---+
프로젝트?
+
| 리눅스카운터
| RC5DES
| 실질헌법 제작
+---+
커널 소식
+
| 안정 버젼: 2.4.14
+---+
테마 선택
+
LSN 방송국?
+
| OFF AIR
+---+
회원
+
| 로그인
+---+
[ 적수네 동네 ] [ 리눅스 상표권 독점 반대 ] [ 한글 리눅스 문서 프로젝트 ] [ KrLine ] [ 사랑넷 ] [ Valid HTML 4.0! ] [ SlashDot ] [ Freshmeat ]
Copyleft (C) 1998-2001 Byeong-Chan Kim . License
TIME: 1791034390
System by WYZsoft, HDD by I.O.Linux, Mizi Research, Embryo, WOWLINUX, Domain by SarangNet, Network by KrLine.