Contents

System/OS
2003.04.23 10:34

[linux] 간단한 NAT 설정 script

Views 12597 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
#!/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 로 수정


?

List of Articles
No. Category Subject Author Date Views
58 System/OS [java] Tomcat/UTF-8 or All 지원 ㅎㅎ hooni 2013.04.23 16743
57 System/OS [windows] 배치(bat)파일 제작 방법 hooni 2003.04.23 17004
56 System/OS [switch] 시스코 스위치 관리자 암호 초기화 방법 hooni 2013.04.23 17186
55 System/OS [windows] 패스워드를 잊어먹었을때.. hooni 2003.04.23 17294
54 System/OS [linux] 최소한의 커널 설정(커널설치 전체과정) hooni 2003.04.23 17398
53 System/OS [linux] 메일서버 세팅정보(sendmail) hooni 2003.04.23 17407
52 System/OS [switch] 시스코 카탈리스트(Cisco Catalyst) 기본 설정 hooni 2013.04.23 17496
51 System/OS 무선 인증 서버.. 김도.. ㅋㅋ file hooni 2013.04.23 17595
50 System/OS 네트워크별 MTU(최대 전송 단위) hooni 2013.04.23 17641
49 System/OS [windows] 도스 사용 팁 hooni 2003.04.23 17808
48 System/OS [linux] 커널 컴파일, 설정 hooni 2003.04.23 17845
47 System/OS [linux] 리눅스,유닉스 /proc/stat 파일 보는 법 hooni 2013.04.23 17916
Board Pagination Prev 1 ... 8 9 10 11 12 13 14 15 16 17 Next
/ 17