Prosze bardzo:
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -F -t nat
iptables -X -t nat
iptables -F -t filter
iptables -X -t filter
 
iptables -t filter -P FORWARD DROP
### Tu masz na cala klase IP
# iptables -t filter -A FORWARD -s 192.168.0.0/255.255.255.0 -d 0/0 -j ACCEPT
# iptables -t filter -A FORWARD -s 0/0 -d 192.168.0.0/255.255.255.0 -j ACCEPT
### Tu na poszczegolne IP wybierz to albo to.
iptables -t filter -A FORWARD -d 192.168.0.2 -j ACCEPT
iptables -t filter -A FORWARD -d 192.168.0.3 -j ACCEPT
iptables -t filter -A FORWARD -d 192.168.0.4 -j ACCEPT
iptables -t filter -A FORWARD -d 192.168.0.5 -j ACCEPT
iptables -t filter -A FORWARD -d 192.168.0.6 -j ACCEPT
iptables -t filter -A FORWARD -d 192.168.0.7 -j ACCEPT
iptables -t filter -A FORWARD -d 192.168.0.9 -j ACCEPT
 
iptables -t filter -A FORWARD -s 192.168.0.2 -j ACCEPT
iptables -t filter -A FORWARD -s 192.168.0.3 -j ACCEPT
iptables -t filter -A FORWARD -s 192.168.0.4 -j ACCEPT
iptables -t filter -A FORWARD -s 192.168.0.5 -j ACCEPT
iptables -t filter -A FORWARD -s 192.168.0.6 -j ACCEPT
iptables -t filter -A FORWARD -s 192.168.0.7 -j ACCEPT
iptables -t filter -A FORWARD -s 192.168.0.9 -j ACCEPT
 
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d 0/0 -j MASQUERADE
modprobe ip_nat_ftp
modprobe ip_nat_irc
 
-------Original Message-------
 
From: Pawel M.
Date: 18 lipiec 2002 15:17:48
Subject: iptables
 
mam prosbe zeby ktos poprawil ten skrypcik.. chodzi iptables
(jajko 2.4.18)
Podobno przy stalym ip nie uzywa sie masquerade.
z gory dzieki. Pawel
#!/bin/sh
echo "1" > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -F -t nat
/sbin/iptables -X -t nat
/sbin/iptables -F -t filter
/sbin/iptables -X -t filter

/sbin/iptables -t filter -P FORWARD DROP
/sbin/iptables -t filter -A FORWARD -s 192.168.0.0/255.255.0.0 -
d 0/0 -j ACCEPT
/sbin/iptables -t filter -A FORWARD -s 0/0 -d
192.168.0.0/255.255.0.0 -j ACCEPT
/sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -d 0/0 -j
MASQUERADE
/sbin/modprobe ip_nat_ftp
/sbin/modprobe ip_nat_irc
/sbin/modprobe ip_conntrack_ftp




-----------------------------------------------------------------------
Wakacje w czapce. Super konkurs fotograficzny - NIKON do wygrania!
Kliknij! < http://wakacje.wp.pl >


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
.

Odpowiedź listem elektroniczym