Fórum Ubuntu CZ/SK
Ubuntu pro osobní počítače => Internet a sítě => Téma založeno: navsteva 18 Června 2015, 11:57:11
-
Ahoj, jedná se o útok přes bittorent protokol proti linuxákům, kteří sdílejí linuxové obrazy?
Je to vše z rozsahu poskytovatele kaiaglobal.com.
Stáhnou soubor, pak nejspíš pošlou do /dev/null a stahujou zase. Jen tento měsíc jen ode mne nasosaly asi 300 GB dat.
(http://www.imgup.cz/images/2015/06/18/debian-8.0.0-i386-netinst.iso.png)
(http://www.imgup.cz/images/2015/06/18/debian-8.0.0-i386-xfce-CD-1.iso.png)
(http://www.imgup.cz/images/2015/06/18/xubuntu-15.04-desktop-amd64.iso.png)
(http://www.imgup.cz/images/2015/06/18/xubuntu-15.04-desktop-i386.iso.png)
Co si o tom myslíte a jak se tomu bránit?
Jaký blocklist proti tomu použít? Aktuálně používám http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz (http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz), ale na tom blocklistu zřejmě nejsou :(.
-
Že bych čekal, až se objeví na nějakém blacklistu a nechal je sosat gigabajty dál ::) . Tak je DROPni.
-
Že bych čekal, až se objeví na nějakém blacklistu a nechal je sosat gigabajty dál ::) . Tak je DROPni.
Hmm, a jak bys technicky postupoval? Co bys přesně do ip tables dal?
Nějak takto?
$ sudo iptables -A INPUT -s 79.141.0.0/16 -j DROP
$ sudo iptables -A INPUT -s 95.141.0.0/16 -j DROP
Nebo nějak jinak? Třeba přes /etc/hosts.deny?
-
Nebo je možné zakázat přímo klienta Rakshasa?
-
No ideální asi bude to nahlásit na onen blacklist a pomoci tak i druhým, než si to škudlit na svém soukromém písečku...
-
No ideální asi bude to nahlásit na onen blacklist a pomoci tak i druhým, než si to škudlit na svém soukromém písečku...
Viděl jsem, že na archlinuxu na to vytvořili bug a jako vhodné řešení to nahlásit trackeru. Ne každý používá blocklisty, a tudíž nějaký blocklist, který já používám nic z principu pro ostatní uživatele ubuntu/mintu/debianu neřeší. Ale blokování přímo na trackeru by bylo systémové řešení.
Bohužel na tom nejsem s angličtinou nejlépe, určitě se týká tento problém i ostatních ubunťáků a jiných linuxáků, mohl by prosím někdo anglicky zdatný zadat bug nebo nahlásit nějak přímo trackerům?
trackery, kterých se to týká jsou:
http://bttracker.debian.org:6969
http://torrents.linuxmint.com:80
http://torrent.ubuntu.com:6969
-
Dear navsteva,
we already noticed this behavior from our customer and forwarded the complaints about it.
But it's up to our client to stop or not to stop this. I will forward this e-mail aswell to them.
If you like you're free to block the specific addresses from your server/client.
Regards,
Denis
-
Jak to prosím zablokuji?
Dal jsem do /etc/rc.local následující:
iptables -A INPUT -s 79.141.0.0/16 -j DROP
iptables -A INPUT -s 95.141.0.0/16 -j DROP
iptables -A OUTPUT -s 79.141.0.0/16 -j DROP
iptables -A OUTPUT -s 95.141.0.0/16 -j DROP
Bohužel to nezabralo.
(http://www.imgup.cz/images/2015/06/23/debian-8.0.0.-i386-netinst.iso.23.06.2015.png)
-
Jak to prosím zablokuji?
Dal jsem do /etc/rc.local následující:
iptables -A INPUT -s 79.141.0.0/16 -j DROP
iptables -A INPUT -s 95.141.0.0/16 -j DROP
iptables -A OUTPUT -s 79.141.0.0/16 -j DROP
iptables -A OUTPUT -s 95.141.0.0/16 -j DROP
protoze to je naprostej nesmysl a nevim, co za experta ti to poradilo :D
zkontroluj po bootu vypis z iptables -vL, jake tam mas pravidla
-
Jak to prosím zablokuji?
Dal jsem do /etc/rc.local následující:
iptables -A INPUT -s 79.141.0.0/16 -j DROP
iptables -A INPUT -s 95.141.0.0/16 -j DROP
iptables -A OUTPUT -s 79.141.0.0/16 -j DROP
iptables -A OUTPUT -s 95.141.0.0/16 -j DROP
protoze to je naprostej nesmysl a nevim, co za experta ti to poradilo :D
zkontroluj po bootu vypis z iptables -vL, jake tam mas pravidla
Díky, večer pošlu výpis. Jen alespoň orientačně, mělo by to být takto?
iptables -A INPUT -s 79.141.0.0/16 -j DROP
iptables -A INPUT -s 95.141.0.0/16 -j DROP
iptables -A OUTPUT -d 79.141.0.0/16 -j DROP
iptables -A OUTPUT -d 95.141.0.0/16 -j DROP
Jinak, nevím, jestli to hraje nějakou roli, používám wicd.
-
no, on ti to spise **znici tvuj normalni firewall pri sve inicializaci ... davat veci do rc.local je vec z 90 let (zacatku 90. let) ... ten, kdo to dela a radi tady, by mel byt zastrelen pred zraky vlastni rodiny ..... (citace ...)
-
no, on ti to spise **znici tvuj normalni firewall pri sve inicializaci ... davat veci do rc.local je vec z 90 let (zacatku 90. let) ... ten, kdo to dela a radi tady, by mel byt zastrelen pred zraky vlastni rodiny ..... (citace ...)
To mne napadlo, že se to přebije nějakýma pravidlama po tom, co se to přihlásí k síti. Jinak jiný firewall mám vypnutý - mám nainstalovaný gufw (a tím pádem i ufw), ale deaktivovaný. V nějakém návodu jsem viděl konfiguraci iptables přes /etc/rc.local. Moje chyba. Mne to přišlo hezké, konfigurovat pár věcí přes jeden textový soubor.
Asi by se to dalo vyřešit jednoduše přes ufw, jeho povolením a příkazy?
sudo ufw deny from 79.141.0.0/16
sudo ufw deny from 95.141.0.0/16
sudo ufw deny to 79.141.0.0/16
sudo ufw deny to 95.141.0.0/16
-
to spis .... to ufw je proste **defaultni zpusob
-
OK, díky.
-
Pozor, u ufw zalezi na poradi pravidel, nez mi to doslo, dost sem se stim natrapil, jaktoze nekdy to de a nekdy ne, pritom slo jen o to, jake pravidlo je po kterem(obecny zakaz/konkretni povoleni).
-
Pozor, u ufw zalezi na poradi pravidel, nez mi to doslo, dost sem se stim natrapil, jaktoze nekdy to de a nekdy ne, pritom slo jen o to, jake pravidlo je po kterem(obecny zakaz/konkretni povoleni).
v celem iptables zalezi na poradi pravidel ;) .... ufw je jen frontend
-
Hlavne nezapomenout na konzi DROPnout vsechno co se explicitne nepovolilo :)
-
Hlavne nezapomenout na konzi DROPnout vsechno co se explicitne nepovolilo :)
Spíš bych šel raději opačnou cestou - povolit všechno a explicitně zakazovat. Mám tam webový server, na kterém není žádný publikační systém - jen statická stránka a nginx, je to běžné pc s běžnýma programama - dropbox, ssh server, tor bridge, 2 bittorent klienty a pod. Sambu aktuálně nepoužívám, ani NFS, pouze sshfs, u SSH mám zakázané přihlašování heslem, přihlášení na roota zakázané. Používat firewall mi přijde trošku zbytečné. Nebo mi hrozí nějaké reálné riziko?
-
Hlavne nezapomenout na konzi DROPnout vsechno co se explicitne nepovolilo :)
Spíš bych šel raději opačnou cestou - povolit všechno a explicitně zakazovat. Mám tam webový server, na kterém není žádný publikační systém - jen statická stránka a nginx, je to běžné pc s běžnýma programama - dropbox, ssh server, tor bridge, 2 bittorent klienty a pod. Sambu aktuálně nepoužívám, ani NFS, pouze sshfs, u SSH mám zakázané přihlašování heslem, přihlášení na roota zakázané. Používat firewall mi přijde trošku zbytečné. Nebo mi hrozí nějaké reálné riziko?
na INPUTU a FORWARDU by jako vychozi mel byt vzdycky DROP ...
alespon muj jednoduchej vychozi fw vypada takhle:
# iptables-save
# Generated by iptables-save v1.4.21 on Tue Jun 23 16:01:13 2015
*nat
:PREROUTING ACCEPT [1977:342126]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [10671:685980]
:POSTROUTING ACCEPT [10653:684972]
-A PREROUTING -p tcp -m tcp --dport 3389 -j DNAT --to-destination 192.168.255.10:3389
-A POSTROUTING -s 192.168.255.0/24 -j MASQUERADE
COMMIT
# Completed on Tue Jun 23 16:01:13 2015
# Generated by iptables-save v1.4.21 on Tue Jun 23 16:01:13 2015
*raw
:PREROUTING ACCEPT [42409690:55457362493]
:OUTPUT ACCEPT [40658913:4532563879]
COMMIT
# Completed on Tue Jun 23 16:01:13 2015
# Generated by iptables-save v1.4.21 on Tue Jun 23 16:01:13 2015
*filter
:INPUT DROP [24401:1770329]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [40658913:4532563879]
-A INPUT -i lo -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i eth0,wlan0 -p tcp -m tcp --dport 445 -j DROP
-A INPUT -i eth0,wlan0 -p tcp -m tcp --dport 139 -j DROP
-A INPUT -p tcp -m tcp --dport 3389 -j ACCEPT
-A INPUT -p tcp -m conntrack --ctstate NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m conntrack --ctstate NEW -m tcp --dport 445 -j ACCEPT
-A INPUT -p tcp -m conntrack --ctstate NEW -m tcp --dport 139 -j ACCEPT
-A FORWARD -s 192.168.255.0/24 -j ACCEPT
-A FORWARD -d 192.168.255.0/24 -j ACCEPT
COMMIT
# Completed on Tue Jun 23 16:01:13 2015
-
Hlavne nezapomenout na konzi DROPnout vsechno co se explicitne nepovolilo :)
Spíš bych šel raději opačnou cestou - povolit všechno a explicitně zakazovat. Mám tam webový server, na kterém není žádný publikační systém - jen statická stránka a nginx, je to běžné pc s běžnýma programama - dropbox, ssh server, tor bridge, 2 bittorent klienty a pod. Sambu aktuálně nepoužívám, ani NFS, pouze sshfs, u SSH mám zakázané přihlašování heslem, přihlášení na roota zakázané. Používat firewall mi přijde trošku zbytečné. Nebo mi hrozí nějaké reálné riziko?
na INPUTU a FORWARDU by jako vychozi mel byt vzdycky DROP ...
alespon muj jednoduchej vychozi fw vypada takhle:
# iptables-save
# Generated by iptables-save v1.4.21 on Tue Jun 23 16:01:13 2015
*nat
:PREROUTING ACCEPT [1977:342126]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [10671:685980]
:POSTROUTING ACCEPT [10653:684972]
-A PREROUTING -p tcp -m tcp --dport 3389 -j DNAT --to-destination 192.168.255.10:3389
-A POSTROUTING -s 192.168.255.0/24 -j MASQUERADE
COMMIT
# Completed on Tue Jun 23 16:01:13 2015
# Generated by iptables-save v1.4.21 on Tue Jun 23 16:01:13 2015
*raw
:PREROUTING ACCEPT [42409690:55457362493]
:OUTPUT ACCEPT [40658913:4532563879]
COMMIT
# Completed on Tue Jun 23 16:01:13 2015
# Generated by iptables-save v1.4.21 on Tue Jun 23 16:01:13 2015
*filter
:INPUT DROP [24401:1770329]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [40658913:4532563879]
-A INPUT -i lo -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i eth0,wlan0 -p tcp -m tcp --dport 445 -j DROP
-A INPUT -i eth0,wlan0 -p tcp -m tcp --dport 139 -j DROP
-A INPUT -p tcp -m tcp --dport 3389 -j ACCEPT
-A INPUT -p tcp -m conntrack --ctstate NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m conntrack --ctstate NEW -m tcp --dport 445 -j ACCEPT
-A INPUT -p tcp -m conntrack --ctstate NEW -m tcp --dport 139 -j ACCEPT
-A FORWARD -s 192.168.255.0/24 -j ACCEPT
-A FORWARD -d 192.168.255.0/24 -j ACCEPT
COMMIT
# Completed on Tue Jun 23 16:01:13 2015
Hmm, to už je vyšší dívčí. Většině věcí tam nerozumím. O článcích na linuxexpressu na téma iptables vím :). Mrknu na to.
-
Tak, zablokoval jsem to pomocí ufw, které jsem aktivoval. Bohužel to stále nefunguje, nedaří se mi to prostřednictvím ufw dostat nakonec. Když to bylo na začátku, tak to nefungovalo.
Výpis iptables -vL --line-numbered
Chain INPUT (policy DROP 79 packets, 4603 bytes)
num pkts bytes target prot opt in out source destination
1 2540K 711M ufw-before-logging-input all -- any any anywhere anywhere
2 2540K 711M ufw-before-input all -- any any anywhere anywhere
3 15731 1539K ufw-after-input all -- any any anywhere anywhere
4 13615 896K ufw-after-logging-input all -- any any anywhere anywhere
5 13615 896K ufw-reject-input all -- any any anywhere anywhere
6 13615 896K ufw-track-input all -- any any anywhere anywhere
Chain FORWARD (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 0 0 ufw-before-logging-forward all -- any any anywhere anywhere
2 0 0 ufw-before-forward all -- any any anywhere anywhere
3 0 0 ufw-after-forward all -- any any anywhere anywhere
4 0 0 ufw-after-logging-forward all -- any any anywhere anywhere
5 0 0 ufw-reject-forward all -- any any anywhere anywhere
6 0 0 ufw-track-forward all -- any any anywhere anywhere
Chain OUTPUT (policy ACCEPT 9 packets, 468 bytes)
num pkts bytes target prot opt in out source destination
1 2158K 4754M ufw-before-logging-output all -- any any anywhere anywhere
2 2158K 4754M ufw-before-output all -- any any anywhere anywhere
3 34002 26M ufw-after-output all -- any any anywhere anywhere
4 34002 26M ufw-after-logging-output all -- any any anywhere anywhere
5 34002 26M ufw-reject-output all -- any any anywhere anywhere
6 34002 26M ufw-track-output all -- any any anywhere anywhere
Chain ufw-after-forward (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-after-input (1 references)
num pkts bytes target prot opt in out source destination
1 0 0 ufw-skip-to-policy-input udp -- any any anywhere anywhere udp dpt:netbios-ns
2 0 0 ufw-skip-to-policy-input udp -- any any anywhere anywhere udp dpt:netbios-dgm
3 0 0 ufw-skip-to-policy-input tcp -- any any anywhere anywhere tcp dpt:netbios-ssn
4 0 0 ufw-skip-to-policy-input tcp -- any any anywhere anywhere tcp dpt:microsoft-ds
5 172 52976 ufw-skip-to-policy-input udp -- any any anywhere anywhere udp dpt:bootps
6 0 0 ufw-skip-to-policy-input udp -- any any anywhere anywhere udp dpt:bootpc
7 0 0 ufw-skip-to-policy-input all -- any any anywhere anywhere ADDRTYPE match dst-type BROADCAST
Chain ufw-after-logging-forward (1 references)
num pkts bytes target prot opt in out source destination
1 0 0 LOG all -- any any anywhere anywhere limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] "
Chain ufw-after-logging-input (1 references)
num pkts bytes target prot opt in out source destination
1 68 3947 LOG all -- any any anywhere anywhere limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] "
Chain ufw-after-logging-output (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-after-output (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-before-forward (1 references)
num pkts bytes target prot opt in out source destination
1 0 0 ACCEPT all -- any any anywhere anywhere ctstate RELATED,ESTABLISHED
2 0 0 ACCEPT icmp -- any any anywhere anywhere icmp destination-unreachable
3 0 0 ACCEPT icmp -- any any anywhere anywhere icmp source-quench
4 0 0 ACCEPT icmp -- any any anywhere anywhere icmp time-exceeded
5 0 0 ACCEPT icmp -- any any anywhere anywhere icmp parameter-problem
6 0 0 ACCEPT icmp -- any any anywhere anywhere icmp echo-request
7 0 0 ufw-user-forward all -- any any anywhere anywhere
Chain ufw-before-input (1 references)
num pkts bytes target prot opt in out source destination
1 69 12561 ACCEPT all -- lo any anywhere anywhere
2 536K 34M ACCEPT all -- any any anywhere anywhere ctstate RELATED,ESTABLISHED
3 21 1304 ufw-logging-deny all -- any any anywhere anywhere ctstate INVALID
4 21 1304 DROP all -- any any anywhere anywhere ctstate INVALID
5 0 0 ACCEPT icmp -- any any anywhere anywhere icmp destination-unreachable
6 0 0 ACCEPT icmp -- any any anywhere anywhere icmp source-quench
7 0 0 ACCEPT icmp -- any any anywhere anywhere icmp time-exceeded
8 0 0 ACCEPT icmp -- any any anywhere anywhere icmp parameter-problem
9 0 0 ACCEPT icmp -- any any anywhere anywhere icmp echo-request
10 0 0 ACCEPT udp -- any any anywhere anywhere udp spt:bootps dpt:bootpc
11 1025 126K ufw-not-local all -- any any anywhere anywhere
12 0 0 ACCEPT udp -- any any anywhere 224.0.0.251 udp dpt:mdns
13 0 0 ACCEPT udp -- any any anywhere 239.255.255.250 udp dpt:1900
14 1025 126K ufw-user-input all -- any any anywhere anywhere
Chain ufw-before-logging-forward (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-before-logging-input (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-before-logging-output (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-before-output (1 references)
num pkts bytes target prot opt in out source destination
1 69 12561 ACCEPT all -- any lo anywhere anywhere
2 469K 1126M ACCEPT all -- any any anywhere anywhere ctstate RELATED,ESTABLISHED
3 1085 104K ufw-user-output all -- any any anywhere anywhere
Chain ufw-logging-allow (0 references)
num pkts bytes target prot opt in out source destination
1 0 0 LOG all -- any any anywhere anywhere limit: avg 3/min burst 10 LOG level warning prefix "[UFW ALLOW] "
Chain ufw-logging-deny (2 references)
num pkts bytes target prot opt in out source destination
1 21 1304 RETURN all -- any any anywhere anywhere ctstate INVALID limit: avg 3/min burst 10
2 0 0 LOG all -- any any anywhere anywhere limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] "
Chain ufw-not-local (1 references)
num pkts bytes target prot opt in out source destination
1 795 65974 RETURN all -- any any anywhere anywhere ADDRTYPE match dst-type LOCAL
2 10 340 RETURN all -- any any anywhere anywhere ADDRTYPE match dst-type MULTICAST
3 220 60128 RETURN all -- any any anywhere anywhere ADDRTYPE match dst-type BROADCAST
4 0 0 ufw-logging-deny all -- any any anywhere anywhere limit: avg 3/min burst 10
5 0 0 DROP all -- any any anywhere anywhere
Chain ufw-reject-forward (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-reject-input (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-reject-output (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-skip-to-policy-forward (0 references)
num pkts bytes target prot opt in out source destination
1 0 0 DROP all -- any any anywhere anywhere
Chain ufw-skip-to-policy-input (7 references)
num pkts bytes target prot opt in out source destination
1 172 52976 DROP all -- any any anywhere anywhere
Chain ufw-skip-to-policy-output (0 references)
num pkts bytes target prot opt in out source destination
1 0 0 ACCEPT all -- any any anywhere anywhere
Chain ufw-track-forward (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-track-input (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-track-output (1 references)
num pkts bytes target prot opt in out source destination
1 402 25169 ACCEPT tcp -- any any anywhere anywhere ctstate NEW
2 671 78521 ACCEPT udp -- any any anywhere anywhere ctstate NEW
Chain ufw-user-forward (1 references)
num pkts bytes target prot opt in out source destination
Chain ufw-user-input (1 references)
num pkts bytes target prot opt in out source destination
1 26 1544 ACCEPT tcp -- any any anywhere anywhere tcp dpt:9001
2 0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:9001
3 0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:9090
4 0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:9090
5 1 60 ACCEPT tcp -- any any anywhere anywhere tcp dpt:9030
6 0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:9030
7 0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:9050
8 0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:9050
9 0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:http
10 0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:http
11 0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:https
12 0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:https
13 0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:db-lsp
14 48 7152 ACCEPT udp -- any any anywhere anywhere udp dpt:17500
15 221 12752 ACCEPT tcp -- any any anywhere anywhere tcp dpt:51413
16 431 44597 ACCEPT udp -- any any anywhere anywhere udp dpt:51413
17 0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:9001
18 2 100 tcp -- any any anywhere anywhere tcp dpt:ssh ctstate NEW recent: SET name: DEFAULT side: source mask: 255.255.255.255
19 0 0 ufw-user-limit tcp -- any any anywhere anywhere tcp dpt:ssh ctstate NEW recent: UPDATE seconds: 30 hit_count: 6 name: DEFAULT side: source mask: 255.255.255.255
20 2 100 ufw-user-limit-accept tcp -- any any anywhere anywhere tcp dpt:ssh
21 0 0 ACCEPT tcp -- any any anywhere anywhere tcp spt:34714
22 0 0 ACCEPT udp -- any any anywhere anywhere udp spt:34714
23 0 0 ACCEPT tcp -- any any anywhere anywhere multiport dports http,https
24 0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:9091
25 0 0 DROP all -- any any reverse.alphalink.fr/16 anywhere
26 0 0 DROP all -- any any 95.141.0.0/16 anywhere
27 0 0 DROP all -- any any anywhere reverse.alphalink.fr/16
28 0 0 DROP all -- any any anywhere 95.141.0.0/16
29 0 0 ACCEPT tcp -- any any anywhere anywhere multiport dports 6881:6891
30 0 0 ACCEPT udp -- any any anywhere anywhere multiport dports 6881:6891
Chain ufw-user-limit (1 references)
num pkts bytes target prot opt in out source destination
1 0 0 LOG all -- any any anywhere anywhere limit: avg 3/min burst 5 LOG level warning prefix "[UFW LIMIT BLOCK] "
2 0 0 REJECT all -- any any anywhere anywhere reject-with icmp-port-unreachable
Chain ufw-user-limit-accept (1 references)
num pkts bytes target prot opt in out source destination
1 2 100 ACCEPT all -- any any anywhere anywhere
Chain ufw-user-logging-forward (0 references)
num pkts bytes target prot opt in out source destination
Chain ufw-user-logging-input (0 references)
num pkts bytes target prot opt in out source destination
Chain ufw-user-logging-output (0 references)
num pkts bytes target prot opt in out source destination
Chain ufw-user-output (1 references)
num pkts bytes target prot opt in out source destination
-
Zkoušel jsem ještě znovu přesunout na začátek, ale nezabralo to.
Aktuální stav iptables -vL
Chain INPUT (policy DROP 21 packets, 1521 bytes)
pkts bytes target prot opt in out source destination
3773K 790M ufw-before-logging-input all -- any any anywhere anywhere
3773K 790M ufw-before-input all -- any any anywhere anywhere
20022 1919K ufw-after-input all -- any any anywhere anywhere
17421 1127K ufw-after-logging-input all -- any any anywhere anywhere
17421 1127K ufw-reject-input all -- any any anywhere anywhere
17421 1127K ufw-track-input all -- any any anywhere anywhere
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ufw-before-logging-forward all -- any any anywhere anywhere
0 0 ufw-before-forward all -- any any anywhere anywhere
0 0 ufw-after-forward all -- any any anywhere anywhere
0 0 ufw-after-logging-forward all -- any any anywhere anywhere
0 0 ufw-reject-forward all -- any any anywhere anywhere
0 0 ufw-track-forward all -- any any anywhere anywhere
Chain OUTPUT (policy ACCEPT 27 packets, 2400 bytes)
pkts bytes target prot opt in out source destination
3275K 7399M ufw-before-logging-output all -- any any anywhere anywhere
3275K 7399M ufw-before-output all -- any any anywhere anywhere
46205 34M ufw-after-output all -- any any anywhere anywhere
46205 34M ufw-after-logging-output all -- any any anywhere anywhere
46205 34M ufw-reject-output all -- any any anywhere anywhere
46205 34M ufw-track-output all -- any any anywhere anywhere
Chain ufw-after-forward (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-after-input (1 references)
pkts bytes target prot opt in out source destination
0 0 ufw-skip-to-policy-input udp -- any any anywhere anywhere udp dpt:netbios-ns
0 0 ufw-skip-to-policy-input udp -- any any anywhere anywhere udp dpt:netbios-dgm
0 0 ufw-skip-to-policy-input tcp -- any any anywhere anywhere tcp dpt:netbios-ssn
0 0 ufw-skip-to-policy-input tcp -- any any anywhere anywhere tcp dpt:microsoft-ds
82 25256 ufw-skip-to-policy-input udp -- any any anywhere anywhere udp dpt:bootps
0 0 ufw-skip-to-policy-input udp -- any any anywhere anywhere udp dpt:bootpc
0 0 ufw-skip-to-policy-input all -- any any anywhere anywhere ADDRTYPE match dst-type BROADCAST
Chain ufw-after-logging-forward (1 references)
pkts bytes target prot opt in out source destination
0 0 LOG all -- any any anywhere anywhere limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] "
Chain ufw-after-logging-input (1 references)
pkts bytes target prot opt in out source destination
20 1461 LOG all -- any any anywhere anywhere limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] "
Chain ufw-after-logging-output (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-after-output (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-before-forward (1 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any any anywhere anywhere ctstate RELATED,ESTABLISHED
0 0 ACCEPT icmp -- any any anywhere anywhere icmp destination-unreachable
0 0 ACCEPT icmp -- any any anywhere anywhere icmp source-quench
0 0 ACCEPT icmp -- any any anywhere anywhere icmp time-exceeded
0 0 ACCEPT icmp -- any any anywhere anywhere icmp parameter-problem
0 0 ACCEPT icmp -- any any anywhere anywhere icmp echo-request
0 0 ufw-user-forward all -- any any anywhere anywhere
Chain ufw-before-input (1 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- lo any anywhere anywhere
127K 12M ACCEPT all -- any any anywhere anywhere ctstate RELATED,ESTABLISHED
119 7354 ufw-logging-deny all -- any any anywhere anywhere ctstate INVALID
119 7354 DROP all -- any any anywhere anywhere ctstate INVALID
0 0 ACCEPT icmp -- any any anywhere anywhere icmp destination-unreachable
0 0 ACCEPT icmp -- any any anywhere anywhere icmp source-quench
0 0 ACCEPT icmp -- any any anywhere anywhere icmp time-exceeded
0 0 ACCEPT icmp -- any any anywhere anywhere icmp parameter-problem
0 0 ACCEPT icmp -- any any anywhere anywhere icmp echo-request
0 0 ACCEPT udp -- any any anywhere anywhere udp spt:bootps dpt:bootpc
549 64061 ufw-not-local all -- any any anywhere anywhere
0 0 ACCEPT udp -- any any anywhere 224.0.0.251 udp dpt:mdns
0 0 ACCEPT udp -- any any anywhere 239.255.255.250 udp dpt:1900
549 64061 ufw-user-input all -- any any anywhere anywhere
Chain ufw-before-logging-forward (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-before-logging-input (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-before-logging-output (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-before-output (1 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any lo anywhere anywhere
124K 298M ACCEPT all -- any any anywhere anywhere ctstate RELATED,ESTABLISHED
1317 109K ufw-user-output all -- any any anywhere anywhere
Chain ufw-logging-allow (0 references)
pkts bytes target prot opt in out source destination
0 0 LOG all -- any any anywhere anywhere limit: avg 3/min burst 10 LOG level warning prefix "[UFW ALLOW] "
Chain ufw-logging-deny (2 references)
pkts bytes target prot opt in out source destination
21 1240 RETURN all -- any any anywhere anywhere ctstate INVALID limit: avg 3/min burst 10
20 1454 LOG all -- any any anywhere anywhere limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] "
Chain ufw-not-local (1 references)
pkts bytes target prot opt in out source destination
441 35391 RETURN all -- any any anywhere anywhere ADDRTYPE match dst-type LOCAL
4 136 RETURN all -- any any anywhere anywhere ADDRTYPE match dst-type MULTICAST
104 28534 RETURN all -- any any anywhere anywhere ADDRTYPE match dst-type BROADCAST
0 0 ufw-logging-deny all -- any any anywhere anywhere limit: avg 3/min burst 10
0 0 DROP all -- any any anywhere anywhere
Chain ufw-reject-forward (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-reject-input (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-reject-output (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-skip-to-policy-forward (0 references)
pkts bytes target prot opt in out source destination
0 0 DROP all -- any any anywhere anywhere
Chain ufw-skip-to-policy-input (7 references)
pkts bytes target prot opt in out source destination
82 25256 DROP all -- any any anywhere anywhere
Chain ufw-skip-to-policy-output (0 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any any anywhere anywhere
Chain ufw-track-forward (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-track-input (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-track-output (1 references)
pkts bytes target prot opt in out source destination
488 29280 ACCEPT tcp -- any any anywhere anywhere ctstate NEW
805 77151 ACCEPT udp -- any any anywhere anywhere ctstate NEW
Chain ufw-user-forward (1 references)
pkts bytes target prot opt in out source destination
Chain ufw-user-input (1 references)
pkts bytes target prot opt in out source destination
0 0 DROP all -- any any anywhere 95.141.0.0/16
0 0 DROP all -- any any anywhere reverse.alphalink.fr/16
14 840 DROP all -- any any 95.141.0.0/16 anywhere
32 1984 DROP all -- any any reverse.alphalink.fr/16 anywhere
9 540 ACCEPT tcp -- any any anywhere anywhere tcp dpt:9001
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:9001
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:9090
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:9090
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:9030
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:9030
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:9050
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:9050
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:http
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:http
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:https
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:https
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:db-lsp
22 3278 ACCEPT udp -- any any anywhere anywhere udp dpt:17500
145 8320 ACCEPT tcp -- any any anywhere anywhere tcp dpt:51413
224 22322 ACCEPT udp -- any any anywhere anywhere udp dpt:51413
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:9001
0 0 tcp -- any any anywhere anywhere tcp dpt:ssh ctstate NEW recent: SET name: DEFAULT side: source mask: 255.255.255.255
0 0 ufw-user-limit tcp -- any any anywhere anywhere tcp dpt:ssh ctstate NEW recent: UPDATE seconds: 30 hit_count: 6 name: DEFAULT side: source mask: 255.255.255.255
0 0 ufw-user-limit-accept tcp -- any any anywhere anywhere tcp dpt:ssh
0 0 ACCEPT tcp -- any any anywhere anywhere tcp spt:34714
0 0 ACCEPT udp -- any any anywhere anywhere udp spt:34714
0 0 ACCEPT tcp -- any any anywhere anywhere multiport dports http,https
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:9091
0 0 ACCEPT tcp -- any any anywhere anywhere multiport dports 6881:6891
0 0 ACCEPT udp -- any any anywhere anywhere multiport dports 6881:6891
Chain ufw-user-limit (1 references)
pkts bytes target prot opt in out source destination
0 0 LOG all -- any any anywhere anywhere limit: avg 3/min burst 5 LOG level warning prefix "[UFW LIMIT BLOCK] "
0 0 REJECT all -- any any anywhere anywhere reject-with icmp-port-unreachable
Chain ufw-user-limit-accept (1 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any any anywhere anywhere
Chain ufw-user-logging-forward (0 references)
pkts bytes target prot opt in out source destination
Chain ufw-user-logging-input (0 references)
pkts bytes target prot opt in out source destination
Chain ufw-user-logging-output (0 references)
pkts bytes target prot opt in out source destination
Chain ufw-user-output (1 references)
pkts bytes target prot opt in out source destination
-
Zkusil jsem jít i cestou úpravy blocklistu - přidal jsem do něj nakonec:
kaiaglobal:79.141.0.0-79.141.255.255
kaiaglobal:95.141.0.0-95.141.255.255
Ani to nezabralo. Transmission sice natáhlo pravidla, ale stejně ode mne stahují dál :-(.
-
Zkusil sem si to s ufw a ftp a kdyz dam prvni pravidlo zakaz pro ip a pak povoleni pro secky, dana zakazana ip se nepripoji, ostatni jinak ano.
sudo ufw status
Stav: aktivní
Do Akce Od
-- ---- --
21/tcp DENY 10.42.0.14
21/tcp ALLOW Anywhere
21/tcp (v6) ALLOW Anywhere (v6)
-
Zkusil sem si to s ufw a ftp a kdyz dam prvni pravidlo zakaz pro ip a pak povoleni pro secky, dana zakazana ip se nepripoji, ostatni jinak ano.
sudo ufw status
Stav: aktivní
Do Akce Od
-- ---- --
21/tcp DENY 10.42.0.14
21/tcp ALLOW Anywhere
21/tcp (v6) ALLOW Anywhere (v6)
Hmm, tu a můžeš zkusit rozsah ip adres? A bez uvedení portu? Protože tak to mám nastaveno, dám sem ještě výstup z ufw status, až se dostanu ke kompu.
Mnohem víc mne ale štve, že nefunguje ani blocklist pro p2p klienty, protože ten je přece za tímto účelem dělaný. I když jsem tam rozsah zapsal - je v něm možná něco špatně? Pokud je v pořádku, tak by to mohlo znamenat, že peerguardian blocklisty jsou pro transmission neúčinné. A ten, kdo by stahoval přes torrent třeba nějaký film a spoléhal by se na blocklist, že bude blokovat rozsah autorskoprávních organizací a pod, tak jim to hezky naservíruje, protože se nechá se ukolébat domělou bezpečností.
Může se někdo podívat na blocklist, proč to ten záznam ignoruje?
http://wordpress.webovky-levne.eu/wp-content/uploads/2015/06/blocklist (http://wordpress.webovky-levne.eu/wp-content/uploads/2015/06/blocklist)
http://wordpress.webovky-levne.eu/wp-content/uploads/2015/06/blocklist.gz (http://wordpress.webovky-levne.eu/wp-content/uploads/2015/06/blocklist.gz)
Na konci blocklistu jsou záznamy
kaiaglobal:79.141.0.0-79.141.255.255
kaiaglobal:95.141.0.0-95.141.255.255
Blocklisty by přitom v transmission měli fungovat, viz https://www.iblocklist.com/ (https://www.iblocklist.com/)
How does it work?
I-Blocklist distributes lists in standard formats including P2P, DAT, and CIDR.
Our lists can be used with software such as PeerBlock, PeerGuardian, iplist, Vuze, Transmission, uTorrent and, pfBlocker.
-
ufw status
Stav: aktivní
Do Akce Od
-- ---- --
95.141.0.0/16 DENY Anywhere
79.141.0.0/16 DENY Anywhere
Anywhere DENY 95.141.0.0/16
Anywhere DENY 79.141.0.0/16
9001 ALLOW Anywhere
9090 ALLOW Anywhere
9030 ALLOW Anywhere
9050 ALLOW Anywhere
80 ALLOW Anywhere
443 ALLOW Anywhere
17500 ALLOW Anywhere
51413 ALLOW Anywhere
9001/tcp ALLOW Anywhere
22/tcp LIMIT Anywhere
Anywhere ALLOW 34714
80,443/tcp ALLOW Anywhere
9091/tcp ALLOW Anywhere
6881:6891/tcp ALLOW Anywhere
6881:6891/udp ALLOW Anywhere
8112 ALLOW Anywhere
443/tcp ALLOW Anywhere
9001 (v6) ALLOW Anywhere (v6)
9090 (v6) ALLOW Anywhere (v6)
9030 (v6) ALLOW Anywhere (v6)
9050 (v6) ALLOW Anywhere (v6)
80 (v6) ALLOW Anywhere (v6)
443 (v6) ALLOW Anywhere (v6)
17500 (v6) ALLOW Anywhere (v6)
51413 (v6) ALLOW Anywhere (v6)
9001/tcp (v6) ALLOW Anywhere (v6)
22/tcp (v6) LIMIT Anywhere (v6)
Anywhere (v6) ALLOW 34714 (v6)
80,443/tcp (v6) ALLOW Anywhere (v6)
9091/tcp (v6) ALLOW Anywhere (v6)
6881:6891/tcp (v6) ALLOW Anywhere (v6)
6881:6891/udp (v6) ALLOW Anywhere (v6)
8112 (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
-
Tak jsem si s ufw ještě trošku pohrál, vymazal jsem všechny pravidla, odinstaloval gufw a ponechal jen ufw, aktuálně mám tyto pravidla:
Uvidím, jestli pomůže.
Stav: aktivní
Do Akce Od
-- ---- --
OpenSSH ALLOW Anywhere
Anywhere DENY 79.141.0.0/16
Anywhere DENY 95.141.0.0/16
79.141.0.0/16 DENY Anywhere
95.141.0.0/16 DENY Anywhere
192.168.0.0/16 ALLOW Anywhere
10.0.0.0/16 ALLOW Anywhere
Anywhere ALLOW 10.0.0.0/16
Anywhere ALLOW 192.168.0.0/16
51413 ALLOW Anywhere
9091 ALLOW Anywhere
80 ALLOW Anywhere
443 ALLOW Anywhere
9050 ALLOW Anywhere
9090 ALLOW Anywhere
9030 ALLOW Anywhere
1750 ALLOW Anywhere
6881:6891/tcp ALLOW Anywhere
6881:6891/udp ALLOW Anywhere
8112 ALLOW Anywhere
17500 ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
51413 (v6) ALLOW Anywhere (v6)
9091 (v6) ALLOW Anywhere (v6)
80 (v6) ALLOW Anywhere (v6)
443 (v6) ALLOW Anywhere (v6)
9050 (v6) ALLOW Anywhere (v6)
9090 (v6) ALLOW Anywhere (v6)
9030 (v6) ALLOW Anywhere (v6)
1750 (v6) ALLOW Anywhere (v6)
6881:6891/tcp (v6) ALLOW Anywhere (v6)
6881:6891/udp (v6) ALLOW Anywhere (v6)
8112 (v6) ALLOW Anywhere (v6)
17500 (v6) ALLOW Anywhere (v6)
-
Nevím, co konkrétně pomohlo, jestli nakonec ufw nebo peerguardian blocklist, ale už se zdá, že ode mne nesosají.
Značím jako [vyřešeno].