Skip to content

[Linux] Proxy 서버 설정하기

조회 수 17107 추천 수 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/709/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수sort

Strace - 시스템콜과 신호 추적 file

Installing NGINX, PHP, and MySQL on Ubuntu 10.04 LTS u...

gcc Library 경로 지정

리눅스에서 GNU Parted로 4K 섹터 디스크 파티션 정렬하기

ctime, mtime, atime 다른 점 설명

What are the bandwidth requirements for running a BigB...

Linux Command 로 Mysql table drop 방법

운영중인 Linux 서버에서 NTFS 파일 시스템 삭제하기

우분투(Ubuntu) ssh 설정하기

linux 커널 파라메터 수정

error: Hm, kex protocol error: type 30 seq 1 [preauth]... file

python과 mysql 연동시 libmysqlclient_r.so.* 에러가 날 ...

hddtemp와 mrtg를 이용한 하드디스크 온도 체크 file

ll 명령시 날짜 전체가 보이도록 하기

tar 압축을 실수로 디렉토리 생성 안하고 풀었을때 대처법

SSL 패스워드 삭제 하기

EXT4 파일 시스템을 Btrfs 파일 시스템으로 변환하기

windows smartctl

ZFS 파일에 ACL 설정

make 정리

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234