Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
c4c0b64e
Commit
c4c0b64e
authored
Aug 05, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update routing update scripts
parent
90d51b3d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
get_ips_z-i.sh
router/get_ips_z-i.sh
+1
-0
update_z-i.sh
router/update_z-i.sh
+6
-2
No files found.
router/get_ips_z-i.sh
View file @
c4c0b64e
...
...
@@ -4,3 +4,4 @@
#cat dump.csv |cut -f1 -d';'|tr '|' '\n'| tr -d ' '|sort -u
#cat dump.csv |cut -f1 -d';'|tr '|' '\n'| tr -d ' '|sed '1d'|sort -u
curl http://reestr.rublacklist.net/api/ips |
sed
-e
's|"||g'
|
sed
-e
's|;|\n|g'
cat
a_manual.list |
grep
-v
"^#"
router/update_z-i.sh
View file @
c4c0b64e
...
...
@@ -18,8 +18,8 @@ ipset create $SETNAME.tmp hash:ip || exit
#done
#ssh -q 192.168.1.217 -l xoxo| grep -v "Last login"| sed $'s/\r//' | while read ip ; do
#
./get_ips_z-i.sh | while read ip ; do
cat
z |
while
read
ip
;
do
./get_ips_z-i.sh |
while
read
ip
;
do
#
cat z | while read ip ; do
#ip rule add to $ip table openroute
ipset add
$SETNAME
.tmp
$ip
done
...
...
@@ -32,6 +32,10 @@ if ! iptables -L -t mangle | grep -q $SETNAME ; then
iptables
-t
mangle
-A
PREROUTING
-i
$IFACE
-m
set
--match-set
$SETNAME
dst
-j
MARK
--set-mark
5
||
exit
fi
if
!
sysctl net.ipv4.conf.tun0.rp_filter |
grep
-q
" = 2"
;
then
sysctl
-w
net.ipv4.conf.tun0.rp_filter
=
2
fi
if
!
ip route show table openroute |
grep
-q
"default dev tun0"
;
then
ip route replace default table openroute scope global nexthop dev tun0
||
exit
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment