[Linux-ag] Re: Linux-ag Toplu Mesajı, Sayı 35, Konu 10
Eray Aslan
eray.aslan at caf.com.tr
20 Eyl 2007 Per 17:28:30 EEST
On 20.09.2007 16:57, Bahattin Doğan wrote:
> Merhaba..
> Aşağıdaki komutları router.sh dosyası adında bir dosyaya yazarak squid
> çalışmazken mark'ladıklarımı ADSL2'ye yönlendirebiliyorum.
> Fakat squid çalışırken, bu komut satırları işe yaramıyor. Squid'de
> default hangi çıkıışı tanımladıysam oraya yönleniyor.
/etc/squid/squid.conf:
# adsl2 kullanicilari icin acl. nasil ayiriyorsaniz artik
acl adsl2 src 10.1.2.0/24
tcp_outgoing_address 192.168.2.50 adsl2
# geri kalanlar icin adsl1
tcp_outgoing_address 192.168.1.200
Gerisini kernel halleder policy routing'iniz calisiyorsa.
--
Eray
> echo 1 > /proc/sys/net/ipv4/ip_forward
> iptables-restore < /usr/local/sbin/firewall.sh
> route del default gw 192.168.2.1 <http://192.168.2.1>
>
> ip route add 192.168.1.0 <http://192.168.1.0> dev eth1 src 192.168.1.200
> <http://192.168.1.200> table T1
> ip route add 192.168.2.0 <http://192.168.2.0> dev eth2 src 192.168.2.50
> <http://192.168.2.50> table T2
> ip route add default via 192.168.2.1 <http://192.168.2.1> table T2
> ip route add default via 192.168.1.254 <http://192.168.1.254> table T1
> ip route add 192.168.1.0 <http://192.168.1.0> dev eth1 src 192.168.1.200
> <http://192.168.1.200>
> ip route add 192.168.2.0 <http://192.168.2.0> dev eth2 src 192.168.2.50
> <http://192.168.2.50>
>
> ip rule add from 192.168.1.200 <http://192.168.1.200> table T1
> ip rule add fwmark 0x6c00 table T1
> ip rule add from 192.168.2.50 <http://192.168.2.50> table T2
> ip rule add fwmark 0xa800 table T2
>
> ip route add 10.1.1.0 <http://10.1.1.0> dev eth0 table T1
> ip route add 127.0.0.0/8 <http://127.0.0.0/8> dev lo table T1
> ip route add 192.168.2.0/24 <http://192.168.2.0/24> dev eth3 table T1
> ip route add 10.1.1.0 <http://10.1.1.0> dev eth0 table T2
> ip route add 127.0.0.0/8 <http://127.0.0.0/8> dev lo table T2
> ip route add 192.168.1.0/24 <http://192.168.1.0/24> dev eth1 table T2
>
>
>
>
> --------- eth1 (eth1 ip= 192.168.1.200 <http://192.168.1.200>,
> ADSL1modem: 192.168.1.254 <http://192.168.1.254>)
> eth0 (eth0 ip=10.1.1.1 <http://10.1.1.1> , iç ağ= 10.1.1.X) ==
>
> ---------- eth2 (eth2 ip= 192.168.2.50 <http://192.168.2.50>,
> ADSL2modem: 192.168.2.1 <http://192.168.2.1>)
>
>
>
> Bahattin DOĞAN
> Bilgisayar Öğretmeni
> Zonguldak Merkez Endüstri Meslek Lisesi
> _______________________________________________
> Linux-ag mailing list
> Linux-ag at liste.linux.org.tr <mailto:Linux-ag at liste.linux.org.tr>
> http://liste.linux.org.tr/mailman/listinfo/linux-ag
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Linux-ag mailing list
> Linux-ag at liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-ag
Linux-ag mesaj listesiyle ilgili
daha fazla bilgi