masterluc



Offline



Activity: 938

Merit: 1013









LegendaryActivity: 938Merit: 1013 Ban Bitcoin XT connections to my node? September 02, 2015, 03:51:23 PM

Last edit: September 02, 2015, 05:57:42 PM by masterluc #1



UPDATE. Found solution.



All paths are according to CeontOS 7. If you have different distrib, change paths.



This goes to autostart:



Code: echo "/usr/bin/ipset create bitcoinxt iphash timeout 0" >> /etc/rc.local

This goes to /etc/cron.hourly/bitcoinxt

Code: #!/bin/bash

/bin/grep BitcoinXT /var/log/kern.log | /usr/bin/perl -e 'while (<>) { if (/SRC=(\d+\.\d+\.\d+\.\d+)/) {print "$1

";} }' | /bin/sort | /usr/bin/uniq -u | /usr/bin/xargs -L 1 ipset -exist add bitcoinxt

Also

Code: # chmod 755 /etc/cron.hourly/bitcoinxt

This goes to iptables

Code: iptables -A INPUT -m set --set bitcoinxt src -j DROP

iptables -A INPUT -p tcp -m tcp --dport 8333 -m string --string "Bitcoin XT" --algo bm --to 65535 -j LOG --log-prefix "BitcoinXT" --log-level 1

iptables -A OUTPUT -m set --match-set bitcoinxt dst -j DROP

Dont forget to

Code: /etc/init.d/iptables save Is there any effective way to do this?UPDATE. Found solution.. If you have different distrib, change paths.This goes to autostart:This goes to /etc/cron.hourly/bitcoinxtAlsoThis goes to iptablesDont forget to Trezor - Bitcoins are safe. Even if PC full of keyloggers.

The Bitcoin network protocol was designed to be extremely flexible. It can be used to create timed transactions, escrow transactions, multi-signature transactions, etc. The current features of the client only hint at what will be possible in the future. vertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, orillegal in your jurisdiction. Advertise here.

meono



Offline



Activity: 196

Merit: 100







Full MemberActivity: 196Merit: 100 Re: Ban Bitcoin XT connections to my node? September 02, 2015, 05:38:13 PM #15 Quote from: masterluc on September 02, 2015, 05:32:14 PM



Code: [root@localhost ~]# grep BitcoinXT /var/log/kern.log | perl -e 'while (<>) { if (/SRC=(\d+\.\d+\.\d+\.\d+)/) {print "$1

";} }' | sort | uniq -u | xargs -L 1 ipset add bitcoinxt

[root@localhost ~]# ipset list

Name: bitcoinxt

Type: hash:ip

Header: family inet hashsize 1024 maxelem 65536 timeout 0

Size in memory: 8588

References: 1

Members:

95.52.18.154 timeout 0

31.162.118.16 timeout 0

188.18.202.245 timeout 0

92.37.204.174 timeout 0

92.37.173.6 timeout 0

95.37.186.63 timeout 0

86.102.161.110 timeout 0

178.44.216.148 timeout 0

195.78.126.113 timeout 0

92.49.177.97 timeout 0

This one should be done periodically



Code: grep BitcoinXT /var/log/kern.log | perl -e 'while (<>) { if (/SRC=(\d+\.\d+\.\d+\.\d+)/) {print "$1

";} }' | sort | uniq -u | xargs -L 1 ipset add bitcoinxt Fill in ban listThis one should be done periodically

You know you should write " hundreds thousands lines of code" (hi ! Turtlehuricane ) as a new blacklisting feature for the next version of bitcoin core.



Gotta love to read how the hypocrites pos in here defend their god given bitcoin rule. You know you should write " hundreds thousands lines of code" (hi ! Turtlehuricane) as a new blacklisting feature for the next version of bitcoin core.Gotta love to read how the hypocrites pos in here defend their god given bitcoin rule.