[linux-network] Iptables Icin Kullanilabilir

---------

New Message Reply About this list Date view Thread view Subject view Author view

From: Sancar Saran (saran@ktg.com.tr)
Date: Mon 07 Oct 2002 - 17:57:00 EEST


#!/bin/bash
in="INPUT"
out="OUTPUT"
for="FORWARD"
post="POSTROUTING"
pre="PREROUTING"

good="eth0" # Internal Ethernet
bad="eth1" # Internet Ethernet
dmz="eth2" # DMZ Ethernet
goodip="192.168.0.1/32" # INternal Ip No
badip="xxx.xxx.xxx.xxx/32" # Internet Ip No
dmzip="xxx.xxx.xxx.xxx/32" # Internet Ip No

int="192.168.0.0/16"
any="0.0.0.0/0"
ipt="/usr/local/sbin/iptables"

squidport ="3128"

$ipt -t nat -A $pre -i $good -p tcp --dport 80 -j REDIRECT
--to-port $squidport
$ipt -t nat -A $post -s $int -o $bad -j MASQUERADE

-- 
Sancar "Delifisek" Saran
Brotherhood of Linux
Share the Knowledge, Protect the Freedom


New Message Reply About this list Date view Thread view Subject view Author view

---------

Bu arsiv hypermail 2b29 tarafindan uretilmistir.