System/OS
2003.04.23 10:34
[linux] 간단한 NAT 설정 script
조회 수 12662 댓글 0
#!/bin/sh
insmod ip_tables
insmod iptable_filter
insmod ip_conntrack
insmod ip_conntrack_ftp
insmod ip_nat_ftp
insmod ipt_state
insmod ipt_limit
iptables -t filter -F user_chain
iptables -t filter -X user_chain
iptables -t filter -N user_chain
iptables -t filter -F FORWARD
#iptables -t filter -A FORWARD -p tcp -d 192.168.3.80 -j user_chain
iptables -t filter -A user_chain -j DROP
iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -s 192.168.1.2 -o eth0 -j SNAT --to 192.168.3.80
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 192.168.3.68
iptables -t nat -F PREROUTING
iptables -A PREROUTING -t nat -d 192.168.3.80 -j DNAT --to 192.168.1.2
##/proc/sys/net/ipv4/ip_forward
##파일을 수정 0 --> 1 로 수정
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
118 | System/OS | [linux] DNS(Domain Name System) 설치, 설정 | hooni | 2003.04.23 | 12522 |
117 | System/OS | [sql] alter table 쿼리 예제 | hooni | 2003.04.23 | 12523 |
116 | System/OS | [linux] 스케쥴링 순서(nice) 변경하기 | hooni | 2003.04.23 | 12607 |
115 | System/OS | [doc] 피쳐셀렉션(feature selection using..) 발표 자료 | hooni | 2013.04.23 | 12614 |
» | System/OS | [linux] 간단한 NAT 설정 script | hooni | 2003.04.23 | 12662 |
113 | System/OS | [linux] 프로세스 상태확인(ps) | hooni | 2003.04.23 | 12774 |
112 | System/OS | [linux] root 전환시 패스워드 없이 su 사용하기 | hooni | 2013.12.22 | 12780 |
111 | System/OS | [linux] 콘솔 기본언어 설정 방법 | hooni | 2013.04.23 | 12883 |
110 | System/OS | [linux] ProFTPD 타임아웃 설정 | hooni | 2003.04.23 | 12911 |
109 | System/OS | [sql] 내 방명록 답글 찾는 쿼리문.. (JOIN 구문) | hooni | 2003.04.23 | 12931 |
108 | System/OS | [router] 시스코 라우터 명령어 모드.. | hooni | 2013.04.23 | 13009 |
107 | System/OS | [linux] 아파치 설치/설정(proxy) | hooni | 2003.04.23 | 13012 |