System/OS
2003.04.23 10:34
[linux] 간단한 NAT 설정 script
Views 12658 Comment 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 로 수정
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
1077 | System/OS | [linux] ipchains 사용예(패킷 필터링) | hooni | 2003.04.23 | 14240 |
1076 | System/OS | [linux] ipfwadm를 이용한 패킷필터링(구버전) | hooni | 2003.04.23 | 13091 |
1075 | System/OS | [windows] 98/ME 속도 빠르게 튜닝(부팅,메모리,레지스터) | hooni | 2003.04.23 | 50527 |
1074 | System/OS | [windows] 도스 사용 팁 | hooni | 2003.04.23 | 17894 |
1073 | System/OS | [windows] 여러가지 활용 팁 | hooni | 2003.04.23 | 20030 |
1072 | System/OS | [windows] 배치(bat)파일 제작 방법 | hooni | 2003.04.23 | 17062 |
1071 | System/OS | [linux] 패킷 스니퍼링 | hooni | 2003.04.23 | 16378 |
1070 | System/OS | [linux] 패킷의 소스 주소 바꾸기 | hooni | 2003.04.23 | 18856 |
1069 | System/OS | [linux] iptables 명령어 매뉴얼(options) | hooni | 2003.04.23 | 11406 |
» | System/OS | [linux] 간단한 NAT 설정 script | hooni | 2003.04.23 | 12658 |
1067 | System/OS | [linux] 랜카드 2개 설정 & iptables 로 사설 ip.. | hooni | 2003.04.23 | 14780 |
1066 | System/OS | [linux] apache, php, jsp 환경설정하기.. | hooni | 2003.04.23 | 15305 |