와우리눅스 7.3 Paran R2 에서 한국통신 메가패스 라이트 잡아쓰기(외장형모뎀)
from : http://www.oggmall.com/?m1=os&m2=Linux&idx=429&cmd=view&cpage=1
동생 PC업해주고 셀566 PC가 하나 생겨서 리눅스 깔다가 삽질한거 정리해서 올려봅니다. 행여 하실분이 계실지도 몰라 올려봅니다.
참고 사이트 : http://hlug.hanyang.ac.kr/~freekgb/html/internet.html
http://hlug.hanyang.ac.kr/~freekgb/html/internet/adsl-rh71.html
http://kltp.kldp.org/stories.php?story=00/10/25/9728800
뭐 위의 내용을 참고로 해서 거의 비슷하다고 보나 나의 경험담으로 해서 몇자 더 적어보고자 합니다.
와우리눅스 7.3 Paran R2 를 사용자 설치하여 가장 기본으로 설치하였다. 그리고 한국통신 메가패스 라이트(외장형 모뎀)를 써보기 위해서 웹서핑을
시작했습니다. 그래서 상기 참고 사이트를 발견 실행에 옮겼다. 몇 개의 문서를 더 발견했는데 이거 저거 해보다가 이것이 결국되어
다른 경험담은 제외하고 된거만 쓰도록 하겠습니다. 그리고 랜카드는 잡혀있는 상태를 전제로 합니다.
맨처음 http://www.roaringpenguin.com/pppoe/ 에서 rp-pppoe-3.5-1.i386.rpm 를 다운받습니다.
그리고 #rpm -Uvh rp-pppoe-3.5-1.i386.rpm 하면 ppp 어쩌구 저쩌구 의존성 때문에 설치가 안됩니다. 설치해 줘야 합니다.
와우리눅스 공개 ftp로 접속하여 /wow/7.3-ParanR2/i386/RedHat/RPMS 에서 ppp-2.4.1-3.i386.rpm 를 다운받도록 합니다.
그리고 요것을 설치한다. #rpm -Uvh ppp-2.4.1-3.i386.rpm 그리고 나서 아까전에 설치안되던 것을 설치토록합니다.
#rpm -Uvh rp-pppoe-3.5-1.i386.rpm <- 일반 text
#rpm -Uvh rp-pppoe-gui-3.5-1.i386.rpm <- GUI모드
그리고 나서 #adsl-setup 하면 아래와 같은 과정을 거칩니다.
Welcome to the Roaring Penguin ADSL client setup. First, I will run
some checks on your system to make sure the PPPoE client is installed
properly...
Looks good! Now, please enter some information:
USER NAME
>>> Enter your PPPoE user name (default klinuxer): 메가패스 아이디를 적어줌.
>>> Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethn, where 'n' is a number.
(default eth0): eth0 그냥 엔터치거나 다음과 같이 입력. 보통 eth0로 랜카드 잡히죠.
Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
>>> Enter the demand value (default no): no 그냥 엔터나 no를 입력합니다.
Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
>>> Enter the DNS information here: 168.126.63.1 메가패스 DNS
Please enter the IP address of your ISP's secondary DNS server.
If you just press enter, I will assume there is only one DNS server.
>>> Enter the secondary DNS server address here: 168.126.63.2 보조 DNS
>>> Please enter your PPPoE password: 비밀번호입력
>>> Please re-enter your PPPoE password: 확인
Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.
The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
>>> Choose a type of firewall (0-2): 0 방화벽 설정
Do you want to start this connection at boot time?
Please enter no or yes.
yes 부팅시 연결여부 <- 근데 왜 난 요거 설정했다는 기억이 없지????
Ethernet Interface: eth0
User name: 아이디
Activate-on-demand: No
Primary DNS: 168.126.63.1
Secondary DNS: 168.126.63.2
Firewalling: NONE
>>> Accept these settings and adjust configuration files (y/n)? 최종확인
마지막으로 추가해야할 사항들입니다.
/etc/ppp/pppoe.conf 파일의 끝에 보면 다음과 같은 부분이 보입니다. 바로 밑에 똑같은 항목이 또 보이는데 위쪽에만 하니깐 되더군요.
# Any extra arguments to pass to pppoe. Normally, use a blank string
# like this:
PPPOE_EXTRA=""
여기에서,
PPPOE_EXTRA="-S pppoe"
라고 써준다. 대소문자에 주의.
그리고 The firewall choices 메뉴에서 다르게 선택했을때는 아래와 같이 한다고 한다. 난 해보다가 그냥 0로 함.
standalone일때는 아래와 masq일 때는 -masq로 하도록한다.
# cp /etc/ppp/firewall-standalone /etc/rc.d/init.d/firewall
# chmod 755 /etc/rc.d/init.d/firewall
추가 -- 매스커레이딩을 위한 파이어월 정책 설정
위의 과정을 하고 난 다음,
/etc/rc.d/init.d/firewall 파일을 수정한다.
#!/bin/sh
#
# firewall-masq This script sets up firewall rules for a
machine
# acting as a masquerading gateway
#
# Copyright (C) 2000 Roaring Penguin Software Inc. This software may
# be distributed under the terms of the GNU General Public License,
version
# 2 or any later version.
# Interface to Internet
EXTIF=ppp+
ANY=0.0.0.0/0
ipchains -P input ACCEPT
ipchains -P output ACCEPT
ipchains -P forward DENY
ipchains -F forward
ipchains -F input
ipchains -F output
# Deny TCP and UDP packets to privileged ports
ipchains -A input -l -i $EXTIF -d $ANY 0:1023 -p udp -j DENY
ipchains -A input -l -i $EXTIF -d $ANY 0:1023 -p tcp -j DENY
# Do masquerading
ipchains -A forward -j MASQ
echo 1 > /proc/sys/net/ipv4/ip_forward
이중에서 매스커레이딩 서버내의 클라이언트들에 대해서 외부접속을 허용
하기 위해서는 # Do masquerading 부분을 고쳐야한다.
클라이언트중에서 192.168.0.2 와 192.168.0.4 에 대해서만 외부접속을 허
용하는 예제로 써보겠다.
더 추가할 클라이언트가 있으면 그대로 더 써 넣어주면 된다.
다음과 같이 고친다.
# Do masquerading
ipchains -A forward -s 192.168.0.2/32 -j MASQ
ipchains -A forward -s 192.168.0.4/32 -j MASQ
echo 1 > /proc/sys/net/ipv4/ip_forward
이렇게 하면 된다. 더이상 손댈 필요가 없다.
위의 내용을 직접 안해봤습니다. 혹시나 싶어서...
- adsl관련 명령어
#adsl-setup
#adsl-config <-gui모드시
#adsl-start
#adsl-connect
#adsl-status
#adsl-stop
상기내용과 관련한 다운로드
ppp-2.4.1-3.i386.rpm
rp-pppoe-3.5-1.i386.rpm
rp-pppoe-gui-3.5-1.i386.rpm