[ SlackList ] [ WkikiSlack ]




iptables i 3 sieciowki

From: Krzysztof <krzyzura_malpka_friko_internet.pl>
Date: Thu Jul 08 2004 - 08:50:26 CEST

Mam Slackware 9.1 i 3 karty sieciowe

eth0 DSL
eth1 siec na 192.168.0...
eth2 siec na 192.168.1...

i teraz mam taki problem chce aby komutery z sieci eth1
widzialy eth0 i eth2
zas komputery z sieci eth2 widzialy tylko eth0

podstawa maskarada wyglada tak i w takim
przydapku obydwie podsieci sie widza



#!/bin/bash
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
iptables -t filter -P OUTPUT ACCEPT
iptables -t filter -P INPUT DROP

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

iptables -t filter -A FORWARD -s 192.168.1.0/255.255.255.0 -d 0/0 -j ACCEPT
iptables -t filter -A FORWARD -s 0/0 -d 192.168.1.0/255.255.255.0 -j ACCEPT

iptables -t filter -A INPUT -j ACCEPT

iptables -t nat -A POSTROUTING -s 192.168.0.1 -d 0/0 -j MASQUERADE
....
....
...
iptables -t nat -A POSTROUTING -s 192.168.1.10 -d 0/0 -j MASQUERADE
....
...
...


Received on Fri Jul 09 00:19:43 2004

This archive was generated by hypermail 2.1.8. Wyprawa Shackleton 2014