System/OS
2003.04.23 10:34
[linux] 간단한 NAT 설정 script
Views 12660 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 |
---|---|---|---|---|---|
202 | System/OS |
[apache2] Redirect HTTP to HTTPS
![]() |
hooni | 2022.02.03 | 836 |
201 | System/OS |
[macos] How to Fix ‘You Shut Down Your Computer Because of a Problem’
![]() |
hooni | 2022.06.01 | 950 |
200 | System/OS | [linux] The Ultimate Wget Download Guide With 15 Awesome Examples | hooni | 2020.05.26 | 985 |
199 | System/OS | 개인적으로 쓰고 있는 bash_profile | hooni | 2015.01.16 | 985 |
198 | System/OS | 개인적으로 쓰고 있는 zshrc 파일 | hooni | 2022.02.25 | 1000 |
197 | System/OS | [mac] How to uninstall MySQL on Mac OS. | hooni | 2017.11.08 | 1039 |
196 | System/OS |
[virtualbox] VirtualBox에 Ubuntu 설치하기
![]() |
hooni | 2019.11.22 | 1064 |
195 | System/OS |
[펌] 마이크로서비스, 모노리포, SRE, ... 덮어놓고 구글 따라하면 안 되는 기술들
![]() |
hooni | 2020.10.15 | 1104 |
194 | System/OS | [mac] 패키지 매니저, MacPort | hooni | 2015.01.03 | 1121 |
193 | System/OS | 콘솔에서 패스워드 걸린 zip 압축하는 명령 | hooni | 2018.03.02 | 1126 |
192 | System/OS | [svn] Can't convert string from native encoding to 'UTF-8' 메시지가 나오는 경우 | hooni | 2014.12.18 | 1157 |
191 | System/OS |
[mac] OS X 엘 캐피탄에서 Soudflower 사용하기
2 ![]() |
hooni | 2016.10.03 | 1169 |