System/OS
2003.04.23 10:34
[linux] 간단한 NAT 설정 script
조회 수 12589 댓글 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 로 수정
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
106 | System/OS | [linux] 프로그램 설치방법 (내공쌓기) | hooni | 2003.04.23 | 13433 |
105 | System/OS | [linux] 쉘 스크립트에 대한 설명과 예제.. | hooni | 2003.04.23 | 13413 |
104 | System/OS | [ms-sql] 프로시져 예제.. | hooni | 2013.04.23 | 13403 |
103 | System/OS | [linux] Xwindow/Xmanager 사용 | hooni | 2003.04.23 | 13326 |
102 | System/OS | [linux] 아파치설치/설정 - SSI(Server Side Include) | hooni | 2003.04.23 | 13206 |
101 | System/OS | [linux] 계정관리하기(내공쌓기) | hooni | 2003.04.23 | 13156 |
100 | System/OS | [linux] 한글 URL 인식할 수 있게 아파치(Apache) 설정 (mod_url.c 설치) | hooni | 2013.04.23 | 13046 |
99 | System/OS | [linux] DHCP(Dynamic Host Configuration Protocol) 서버 | hooni | 2003.04.23 | 13023 |
98 | System/OS | [linux] Proftpd 설치 가이드 | hooni | 2003.04.23 | 13013 |
97 | System/OS | [linux] ipfwadm를 이용한 패킷필터링(구버전) | hooni | 2003.04.23 | 13009 |
96 | System/OS | [linux] 아파치 설치/설정(proxy) | hooni | 2003.04.23 | 12965 |
95 | System/OS | [router] 시스코 라우터 명령어 모드.. | hooni | 2013.04.23 | 12942 |