System/OS
2003.04.23 10:34

[linux] 간단한 NAT 설정 script

조회 수 12644 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
#!/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
번호 분류 제목 글쓴이 날짜 조회 수
138 System/OS [mac] 맥(OSX)에서 NTFS, 윈도우에서 HFS+ 사용하기 file hooni 2014.03.12 5172
137 System/OS [mac] VirtualBox 실행 스크립트와 bash_profile 설정 file hooni 2020.07.08 1163
136 System/OS [mac] SVN 1.8 업데이트 방법 hooni 2013.09.24 14684
135 System/OS [mac] OSX(맥) 단축키 설명 ㅎㅎ file hooni 2013.04.23 29643
134 System/OS [mac] OS X 요세미티 사용자가 많이 겪는 버그와 몇몇 불편사항 file hooni 2015.01.04 1665
133 System/OS [mac] OS X 엘 캐피탄에서 Soudflower 사용하기 2 file hooni 2016.10.03 1157
132 System/OS [mac] Mac에서 Mac으로 원격제어하기 (맥에서 맥으로) file hooni 2013.10.08 37239
131 System/OS [mac] Mac OS에서 재생되는 사운드를 녹음하는 방법 file hooni 2016.10.03 1728
130 System/OS [mac] Mac OS 패키지 매니저, HomeBrew file hooni 2015.01.03 1440
129 System/OS [mac] How to uninstall MySQL on Mac OS. hooni 2017.11.08 1021
128 System/OS [mac] Homebrew/rvm/cocoapod setting hooni 2017.07.29 1155
127 System/OS [mac] Charlesproxy 간단한 설정 내용~ hooni 2013.11.12 12425
126 System/OS [macos] How to Fix ‘You Shut Down Your Computer Because of a Problem’ file hooni 2022.06.01 922
125 System/OS [linux] 한글 URL 인식할 수 있게 아파치(Apache) 설정 (mod_url.c 설치) hooni 2013.04.23 13127
124 System/OS [linux] 프로세스의 stat 상태에 대한 설명 hooni 2013.04.23 10820
123 System/OS [linux] 프로세스 상태확인(ps) hooni 2003.04.23 12763
Board Pagination Prev 1 3 4 5 6 7 ... 13 Next
/ 13