{"action":"created","issue":{"url":"https://api.github.com/repos/mbg033/openvpn-openwrt-fuckrkn/issues/5","repository_url":"https://api.github.com/repos/mbg033/openvpn-openwrt-fuckrkn","labels_url":"https://api.github.com/repos/mbg033/openvpn-openwrt-fuckrkn/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/mbg033/openvpn-openwrt-fuckrkn/issues/5/comments","events_url":"https://api.github.com/repos/mbg033/openvpn-openwrt-fuckrkn/issues/5/events","html_url":"https://github.com/mbg033/openvpn-openwrt-fuckrkn/issues/5","id":316976497,"number":5,"title":"Hash is full","user":{"login":"kirush0280","id":13412942,"avatar_url":"https://avatars3.githubusercontent.com/u/13412942?v=4","gravatar_id":"","url":"https://api.github.com/users/kirush0280","html_url":"https://github.com/kirush0280","followers_url":"https://api.github.com/users/kirush0280/followers","following_url":"https://api.github.com/users/kirush0280/following{/other_user}","gists_url":"https://api.github.com/users/kirush0280/gists{/gist_id}","starred_url":"https://api.github.com/users/kirush0280/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirush0280/subscriptions","organizations_url":"https://api.github.com/users/kirush0280/orgs","repos_url":"https://api.github.com/users/kirush0280/repos","events_url":"https://api.github.com/users/kirush0280/events{/privacy}","received_events_url":"https://api.github.com/users/kirush0280/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-23T20:45:55Z","updated_at":"2018-05-20T01:49:07Z","closed_at":null,"author_association":"NONE","body":"root@OpenWrt:~# /usr/bin/fuck_rkn.sh\r\nipset v6.20.1: Error in line 42953: Hash is full, cannot add more elements\r\n---\r\nResolve:\r\n\r\n```\r\n#!/bin/sh\r\n# original script location: https://gist.github.com/sourenaraya/f8729694c4bf0ba7cba1\r\n\r\n\r\nVPN_DEV='tun0'\r\nLOCALNET_DEV='br-lan'\r\nMARK='0xACCE55'\r\nTABLE='410'\r\nIPSET_ADDRLIST_NAME='FuckRKN'\r\nIPSET_CIDRLIST_NAME='FuckRKN_zones'\r\nIPSET_FILE='/tmp/ipset.addrlist'\r\nIPSET2_FILE='/tmp/ipset.cidrlist'\r\nANTIZAPRET_API_URL=\"https://api.antizapret.info/group.php\"\r\n\r\n# quirk..\r\nlogger \"deleting routes added by openvpn client..\"\r\nip route del 0.0.0.0/1 2>&1 | logger\r\nip route del 128.0.0.0/1 2>&1 | logger\r\n\r\nlogger \"Starting fuck_rkn...for zones \"\r\nIPLIST=$(wget --quiet -O-  $ANTIZAPRET_API_URL | grep -v '/' | sed -e 's/,/\\n/g'| sort | uniq )\r\n#IPLIST=\"192.230.64.4 185.11.124.4 192.230.65.4\"\r\n\r\nipset -! create $IPSET_ADDRLIST_NAME hash:ip hashsize 1677721 maxelem 1677721\r\n#65536\r\n\r\nIPLIST2=$(wget --quiet -O-  $ANTIZAPRET_API_URL | grep '/' | sed -e 's/,/\\n/g'| sort | uniq)\r\nipset -! create $IPSET_CIDRLIST_NAME hash:net hashsize 1024\r\n\r\nfor ipaddr in $IPLIST\r\ndo\r\n   echo \"add $IPSET_ADDRLIST_NAME $ipaddr\" >> $IPSET_FILE\r\ndone\r\n\r\nfor ipaddr in $IPLIST2\r\ndo\r\n  echo \"add $IPSET_CIDRLIST_NAME $ipaddr\" >> $IPSET2_FILE\r\ndone\r\n\r\nipset -! restore < $IPSET_FILE\r\nipset -! restore < $IPSET2_FILE\r\n\r\niptables -t raw -A PREROUTING -m set --match-set $IPSET_ADDRLIST_NAME dst -j MARK --set-mark $MARK\r\niptables -t raw -A PREROUTING -m set --match-set $IPSET_CIDRLIST_NAME dst -j MARK --set-mark $MARK\r\n\r\n# deleting old rules, if any\r\nlogger \"deleting old rules..\"\r\n\r\nrc=0;\r\nwhile [ $rc -eq 0 ]; do\r\n        ip rule del fwmark $MARK/$MARK lookup $TABLE; rc=$?;\r\ndone\r\n\r\nip route add default dev $VPN_DEV table $TABLE\r\nip rule add fwmark $MARK/$MARK lookup $TABLE\r\n\r\nlogger \"$IPSET_ADDRLIST_NAME iplist updated. $( cat $IPSET_FILE | wc -l ) addresses in list.\"\r\nlogger \"$IPSET_CIDRLIST_NAME iplist updated. $( cat $IPSET2_FILE | wc -l ) addresses in list.\"\r\n\r\nrm $IPSET_FILE\r\nrm $IPSET2_FILE\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/mbg033/openvpn-openwrt-fuckrkn/issues/comments/390451742","html_url":"https://github.com/mbg033/openvpn-openwrt-fuckrkn/issues/5#issuecomment-390451742","issue_url":"https://api.github.com/repos/mbg033/openvpn-openwrt-fuckrkn/issues/5","id":390451742,"user":{"login":"Andrew-Shtein","id":12440746,"avatar_url":"https://avatars0.githubusercontent.com/u/12440746?v=4","gravatar_id":"","url":"https://api.github.com/users/Andrew-Shtein","html_url":"https://github.com/Andrew-Shtein","followers_url":"https://api.github.com/users/Andrew-Shtein/followers","following_url":"https://api.github.com/users/Andrew-Shtein/following{/other_user}","gists_url":"https://api.github.com/users/Andrew-Shtein/gists{/gist_id}","starred_url":"https://api.github.com/users/Andrew-Shtein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andrew-Shtein/subscriptions","organizations_url":"https://api.github.com/users/Andrew-Shtein/orgs","repos_url":"https://api.github.com/users/Andrew-Shtein/repos","events_url":"https://api.github.com/users/Andrew-Shtein/events{/privacy}","received_events_url":"https://api.github.com/users/Andrew-Shtein/received_events","type":"User","site_admin":false},"created_at":"2018-05-20T01:49:06Z","updated_at":"2018-05-20T01:49:06Z","author_association":"NONE","body":"Я не про ipset. я именно про правила iptables:\r\n\r\n```\r\niptables -t raw -A PREROUTING -m set --match-set $IPSET_ADDRLIST_NAME dst -j MARK --set-mark $MARK\r\niptables -t raw -A PREROUTING -m set --match-set $IPSET_CIDRLIST_NAME dst -j MARK --set-mark $MARK\r\n```"}}
{"actor":{"display_login":"Andrew-Shtein"}}