기본 콘텐츠로 건너뛰기

내부 IP 장비 yum update하는 하기!!! (proxychains + ssh tunnel)



내부 IP를 사용하는 장비를 최신커널이나 시스템 update하는 경우

ssh tunnel를 이용하는 방법과 iptable를 이용하여 route 하는 방법이 있음.

내부 network이 제어가능 하면 iptable을 이용하는 경우가 더 쉽고 편하지만.

일단 가능하지 않는 경우 ssh tunnel을 이용 update하는 방법입니다.



 proxychains 설치.
http://proxychains.sourceforge.net/
$ ./configure
$ make
$ make install


A ( 외부IP1 , 내부IP1 ) B ( 내부IP2 )


1. A 장비 ( 54321 ) 포트 (tunnel 생성)

ssh -f -N -D 54321 localhost


ssh 아이디2@B내부IP2 -R6666:localhost:54321


2. B장비 (proxychains 환경설정)

Setup /etc/proxychains.conf to use the forwarded socks proxy:

[ProxyList]
# SSH reverse proxy
socks4  127.0.0.1 6666

3. 설치확인 (dns lookup test)


$ proxyresolv ftp.daum.net
|S-chain|-<>-127.0.0.1:6666-<><>-4.2.2.2:53-<><>-OK
211.62.252.36



4. 시스템 업데이트 ( 업데이트)

$ proxychains yum update
$ proxychains apt-get update


5. 오류처리
ERROR: ld.so: object 'libproxychains.so.3.0.0' from LD_PRELOAD cannot be preloaded: ignored.

이런 메시지가 발생하면 proxychains,   proxyresolv을 vi로 LD_PRELOAD 경로를 full path로 지정한다.






참고: http://serverfault.com/questions/361794/reverse-proxy-web-access-on-a-server-where-only-ssh-is-allowed




댓글

이 블로그의 인기 게시물

oradiag_??? 로그 생성안되게 하는 방법

cx_Oracle이나 oci로 개발된 프로그램을 사용하다 보면 $HOME에 orgdiag_사용자계정으로 로그가 대량으로 저장되는 경우가 발생합니다. 이런 경우에 로그가 남지 않도록 하던지 아님 다른 경로에 저장하는 방법은  아래와 같은 방법으로 처리할 수 있습니다. 로그 안남기는 방법은. 환경변수에 추가 export TNS_ADMIN=/home/eek/conf/ 해당경로에 sqlnet.ora파일 생성해서 DIAG_ADR_ENABLED=off TRACE_LEVEL_CLIENT=off LOG_FILE_CLIENT=/dev/null 설정값을 추가하면 로그 파일이 생성되지 않음. 자세한 설정 정보는 http://docs.oracle.com/cd/B28359_01/network.111/b28317/sqlnet.htm#BIIDEAFI 참고하세요. 끝.

Visual Leak Detector - Enhanced Memory Leak Detection for Visual C++

Download Visual Leak Detector - 515.7 Kb Download demo console project - 518 Kb Download demo MFC project - 525.2 Kb Download the source code - 29 Kb What's New 30 March 2005 - Version 0.9d has been newly released. This is a fairly major release that features significant changes to the way VLD interfaces with the application being debugged. With this release, VLD is now packaged in library form. Packaged as a pre-built library, it is now much easier to start using VLD with your projects because it no longer requires you to set-up your build environment in any particular way. For example, you'll no longer need to have the Platform SDK installed in order to use VLD. You also won't need to configure Visual C++'s include search path to include directories in any specific order. Introduction This memory leak detector is superior, in a number of ways, to the memory leak detection provided natively by MFC or the Microsoft C runtime library. First, built-in lea...

Oracle Instant Client + sqlldr install

Instant Client Downloads + SQL*Loader 설치 http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html 아래와 같이 버젼에 따라서 3가지를 다운로드 합니다. basic, sdk, sqlplus instantclient-basic-linux.x64-11.2.0.3.0.zip instantclient-sdk-linux.x64-11.2.0.3.0.zip instantclient-sqlplus-linux.x64-11.2.0.3.0.zip 설치되어있는 oracle 에서 rdms , nls , sqlldr 를 복사합니다. cp -r /home/oracle/product/10/rdbms ~eek/usr/instantclient_10_2/ cp -r /home/oracle/product/10/nls ~eek/usr/instantclient_10_2/ # 파일 복사 cp -r /home/oracle/product/10/bin/sqlldr ~eek/usr/instantclient_10_2/ # 권한설정 chown -R eek.eek ~eek/usr/instantclient_10_2/ # 환경변수 등록 export NLS_LANG=AMERICAN_AMERICA.KO16KSC5601 export ORACLE_HOME=/home/eek/usr/instantclient_10_2 export ORA_NLS10=$ORACLE_HOME/nls/data