Contents

System/OS
2003.04.23 10:34

[linux] 간단한 NAT 설정 script

조회 수 12608 댓글 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] iptables 초간단 세팅 스크립트

    Date2017.09.26 CategorySystem/OS Byhooni Views1245
    Read More
  2. [linux] man 명령어 뽀개기..

    Date2003.04.23 CategorySystem/OS Byhooni Views8725
    Read More
  3. [linux] Masquerade 가상 ip분할기법

    Date2003.04.23 CategorySystem/OS Byhooni Views47939
    Read More
  4. [linux] Oracle8.1.6, Mysql+PHP+Zend Optimizer+APACHE+Tomcat(jsp,servlet)+IMAP+gd

    Date2003.04.23 CategorySystem/OS Byhooni Views32462
    Read More
  5. [linux] Proftpd 설치 가이드

    Date2003.04.23 CategorySystem/OS Byhooni Views13030
    Read More
  6. [linux] ProFTPD 타임아웃 설정

    Date2003.04.23 CategorySystem/OS Byhooni Views12853
    Read More
  7. [linux] resolv.con 초기화 되는 문제

    Date2014.04.05 CategorySystem/OS Byhooni Views4626
    Read More
  8. [linux] root 전환시 패스워드 없이 su 사용하기

    Date2013.12.22 CategorySystem/OS Byhooni Views12688
    Read More
  9. [linux] root도 삭제하지 못하는 파일 속성

    Date2003.04.23 CategorySystem/OS Byhooni Views12412
    Read More
  10. [linux] sendmail 설정/사용

    Date2003.04.23 CategorySystem/OS Byhooni Views14574
    Read More
  11. [linux] split 명령어

    Date2014.03.11 CategorySystem/OS Byhooni Views4309
    Read More
  12. [linux] SSH에 대한 기본 설명과 설치/설정

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