Contents

System/OS
2003.04.23 10:34

[linux] 간단한 NAT 설정 script

조회 수 12593 댓글 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 로 수정


?

  1. [linux] ssh에서 원격 파일 전송하기..

    Date2013.04.23 CategorySystem/OS Byhooni Views14153
    Read More
  2. [linux] The Ultimate Wget Download Guide With 15 Awesome Examples

    Date2020.05.26 CategorySystem/OS Byhooni Views795
    Read More
  3. [linux] vi 편집기 간단한 명령과 환경설정

    Date2003.04.23 CategorySystem/OS Byhooni Views11359
    Read More
  4. [linux] wget 명령 사용 예제

    Date2020.05.26 CategorySystem/OS Byhooni Views1430
    Read More
  5. [linux] Xwindow/Xmanager 사용

    Date2003.04.23 CategorySystem/OS Byhooni Views13328
    Read More
  6. [linux] X환경 GNOME에서 KDE로 바꾸는 법..

    Date2013.04.23 CategorySystem/OS Byhooni Views12365
    Read More
  7. [linux] yum 업데이트 시 커널 제외하기

    Date2014.09.11 CategorySystem/OS Byhooni Views1256
    Read More
  8. [linux] 간단한 find 명령어 설명(업데이트 해야 함)

    Date2013.04.23 CategorySystem/OS Byhooni Views9111
    Read More
  9. [linux] 간단한 NAT 설정 script

    Date2003.04.23 CategorySystem/OS Byhooni Views12593
    Read More
  10. [linux] 간단한 vi편집기 사용 명령

    Date2003.04.23 CategorySystem/OS Byhooni Views13456
    Read More
  11. [linux] 계정관리하기(내공쌓기)

    Date2003.04.23 CategorySystem/OS Byhooni Views13157
    Read More
  12. [linux] 기본 명령어 (내공쌓기)

    Date2003.04.23 CategorySystem/OS Byhooni Views14333
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 17 Next
/ 17