Freesco, NND, CDN, EOS http://forum.freesco.pl/ |
|
iptables - blokowanie gadu gadu - problem http://forum.freesco.pl/viewtopic.php?f=24&t=17321 |
Strona 1 z 1 |
Autor: | boziemniak [ poniedziałek, 24 listopada 2008, 18:48 ] |
Tytuł: | iptables - blokowanie gadu gadu - problem |
Witam, jak w temacie mam problem z iptables, a mianowicie chodzi mi o zablokowanie gadu gadu dla konkretnego ip w sieci lokalnej, wymyslilem sobie, ze zablokuje 3 klasy na których sa servery gg 91.197.13.0/24 217.17.41.82/28 217.17.45.133/27 I oczywiscie nie dziala. Troche przy pomocy internetu troche przy pomocy MAN'a wymyslilem cos takiego: iptables -t filter -I INPUT -i eth1 -s 192.168.0.76 -p tcp -d 91.197.13.0/24 -j DROP iptables -t filter -I INPUT -i eth1 -s 192.168.0.76 -p tcp -d 217.17.41.82/28 -j DROP iptables -t filter -I INPUT -i eth1 -s 192.168.0.76 -p tcp -d 217.17.45.133/27 -j DROP wklepalem i dalem /etc/rc.d/iptables save , pozniej restart i otrzymalem: Wynik iptables -L [root@TechCom admin]# iptables -L Chain INPUT (policy DROP) target prot opt source destination DROP tcp -- Techcom_kafejka unused-217017045128.atman.pl/27 DROP tcp -- Techcom_kafejka GADUGADU.atman.pl/28 DROP tcp -- Techcom_kafejka ip-91-197-13-0.gadu-gadu.pl/24 ACCEPT all -- anywhere anywhere DROP tcp -- anywhere anywhere multiport dports 135,445 REJECT tcp -- anywhere anywhere tcp dpt:auth reject-with icmp-port-unreachable REJECT tcp -- anywhere anywhere tcp dpt:1080 reject-with icmp-port-unreachable ACCEPT tcp -- anywhere anywhere tcp dpt:www ACCEPT tcp -- anywhere anywhere tcp dpt:ftp-data ACCEPT tcp -- anywhere anywhere tcp dpt:ftp ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT icmp -- anywhere anywhere icmp echo-request limit: avg 1/sec burst 5 ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:3000 ACCEPT tcp -- anywhere anywhere tcp dpt:3000 Chain FORWARD (policy DROP) target prot opt source destination ACCEPT all -- anywhere anywhere DROP tcp -- anywhere anywhere multiport dports 135,445 ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:3000 ACCEPT tcp -- anywhere anywhere tcp dpt:3000 Chain OUTPUT (policy ACCEPT) target prot opt source destination (TechCom_Kafejka) to komputer na ktorym chce blokowac gg, oczywiscie gadu gadu na tym komputerze dziala. I tu moje pytanie do Was, co jest nie tak? Albo moze macie jakas inna metode zablokowania gg dla komputera w lanie? Dodam jeszcze wpis z ifconfig czym jest eth1: eth1 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX inet addr:192.168.0.99 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:19711896 errors:0 dropped:0 overruns:0 frame:0 TX packets:25855632 errors:0 dropped:0 overruns:0 carrier:0 collisions:2006108 txqueuelen:1000 RX bytes:42915439 (40.9 Mb) TX bytes:145673001 (138.9 Mb) Interrupt:19 Base address:0xf000 Z Gory dziekuje za pomoc. Pozdrawiam Dorzuce jeszcze wersje NND i iptables. iptables v1.3.4 Linux TechCom 2.4.35-2nnd #1 SMP pią lut 15 18:08:56 GMT 2008 i686 Intel(R) Celeron(R) CPU 430 @ 1.80GHz GenuineIntel GNU/Linux |
Autor: | zciech [ wtorek, 25 listopada 2008, 11:42 ] |
Tytuł: | |
Nieźle to wykombinowałeś ![]() Tylko, że w łańcuchu FORWARD a nie INPUT |
Autor: | boziemniak [ środa, 26 listopada 2008, 12:01 ] |
Tytuł: | |
zciech pisze: Nieźle to wykombinowałeś
![]() Tylko, że w łańcuchu FORWARD a nie INPUT Dzięki - jeszcze nie do końca rozumiem te łańcuchy, tzn. nie bardzo wiem, który kiedy stosować w każdym bądź razie na FORWARD działa ![]() |
Strona 1 z 1 | Strefa czasowa UTC+2godz. |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |