[ SlackList ] [ WkikiSlack ] |
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