Skip to content

[Linux] Proxy 서버 설정하기

조회 수 17210 추천 수 0 2014.06.17 06:55:44

서버중 외부로 나가는 트래픽이 막혀있는 서버가 있다면 프록시를 통해 외부로 나가는 요청을 할수가 있습니다.

 

 

1. 로그인 세션 동안만 유지되는 방법


텔넷이나 ssh에 로그인 되어있는동안만 프록시를 사용하고 있다면 다음과 같이 사용하면 됩니다.

 


# 프록시 서버 설정
export http_proxy=http://www.yourproxyserver.com:port
export https_proxy=http://www.yourproxyserver.com:port
#프록시서버 해제
unset http_proxy
unset https_proxy
 

 

2. 로그인 세션이 종료된 후에도 프록시를 유지시키는 방법

 

 


 
여기서는 .bashrc에 작업했지만 .profile, .bash_profile, .bashrc_profile 어디에 설정해도 동일합니다.
vi ~/.bashrc
 
아래내용 추가
export http_proxy=http://www.yourproxyserver.com:port
export https_proxy=http://www.yourproxyserver.com:port
저장후
 
source ~/.bashrc
 


이후 wget이나 curl로 외부로 요청이 되었을때 데이터를 제대로 가져오면 프록시 설정이 제대로 된것입니다.

 

 
wget www.daum.net
혹은
curl -0 www.daum.net
 

profile

일요일은 짜빠게뤼~ 먹는날~^^

엮인글 :
http://adminplay.com/327922/461/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
27 웹서버 트래픽 시각화 logstalgia l2zeo 2013-05-03 6118
26 Installing NGINX, PHP, and MySQL on Ubuntu 10.04 LTS u... ADMINPLAY 2013-04-11 6098
25 Strace - 시스템콜과 신호 추적 file ADMINPLAY 2014-02-25 6094
24 gcc Library 경로 지정 ADMINPLAY 2014-04-07 6077
23 ctime, mtime, atime 다른 점 설명 ADMINPLAY 2014-02-07 5990
22 What are the bandwidth requirements for running a BigB... ADMINPLAY 2013-05-06 5970
21 Linux Command 로 Mysql table drop 방법 ADMINPLAY 2014-04-07 5778
20 운영중인 Linux 서버에서 NTFS 파일 시스템 삭제하기 ADMINPLAY 2013-01-16 5736
19 error: Hm, kex protocol error: type 30 seq 1 [preauth]... file ADMINPLAY 2016-05-20 5677
18 우분투(Ubuntu) ssh 설정하기 ADMINPLAY 2013-02-27 5665
17 linux 커널 파라메터 수정 ADMINPLAY 2013-05-12 5614
16 python과 mysql 연동시 libmysqlclient_r.so.* 에러가 날 ... ADMINPLAY 2014-03-27 5600
15 hddtemp와 mrtg를 이용한 하드디스크 온도 체크 file ADMINPLAY 2013-12-19 5516
14 ll 명령시 날짜 전체가 보이도록 하기 ADMINPLAY 2014-01-02 5485
13 tar 압축을 실수로 디렉토리 생성 안하고 풀었을때 대처법 ADMINPLAY 2013-09-22 5463
12 EXT4 파일 시스템을 Btrfs 파일 시스템으로 변환하기 ADMINPLAY 2015-07-07 5459
11 SSL 패스워드 삭제 하기 ADMINPLAY 2014-04-27 5448
10 make 정리 ADMINPLAY 2013-05-12 5341
9 ZFS 파일에 ACL 설정 ADMINPLAY 2014-02-03 5338
8 windows smartctl ADMINPLAY 2013-09-22 5330

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234