Contents

System/OS
2003.04.23 10:34

[linux] 간단한 NAT 설정 script

Views 12662 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
#!/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] 프로세스 상태확인(ps)

    Date2003.04.23 CategorySystem/OS Byhooni Views12774
    Read More
  2. [mysql] error while loading shared libraries: libmysqlclient.so.10:

    Date2003.04.23 CategoryDatabase Byhooni Views12730
    Read More
  3. [c++] Win32 API 기본 출력인 MessageBox() 함수 사용 예제..

    Date2013.04.23 CategoryDevelop Byhooni Views12706
    Read More
  4. [linux] 간단한 NAT 설정 script

    Date2003.04.23 CategorySystem/OS Byhooni Views12662
    Read More
  5. [api] 인스타그램에서 최신 이미지 가져오기 (Using Instagram API)

    Date2018.04.05 CategoryDevelop Byhooni Views12642
    Read More
  6. [flash] 맘에 드는 파이차트

    Date2013.04.23 CategoryEtc Byhooni Views12626
    Read More
  7. [sql] 간단한 SQL 문법 정리

    Date2003.04.23 CategoryDatabase Byhooni Views12626
    Read More
  8. [doc] 피쳐셀렉션(feature selection using..) 발표 자료

    Date2013.04.23 CategorySystem/OS Byhooni Views12614
    Read More
  9. [linux] 스케쥴링 순서(nice) 변경하기

    Date2003.04.23 CategorySystem/OS Byhooni Views12607
    Read More
  10. [ppt] 네오웹 소프트.. 발표 자료 모음

    Date2003.04.23 CategoryPPT Byhooni Views12592
    Read More
  11. [c] flooding 알고리즘 미로 찾기(도스용) 소스코드

    Date2003.04.23 CategoryDevelop Byhooni Views12589
    Read More
  12. [doc] 위탁과제 제안서와 발표자료(pdf)

    Date2013.04.23 CategoryPPT Byhooni Views12569
    Read More
Board Pagination Prev 1 ... 26 27 28 29 30 31 32 33 34 35 ... 98 Next
/ 98