Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nayuos-ebuilds
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
nayuos-ebuilds
Commits
a6678438
Commit
a6678438
authored
Dec 14, 2015
by
iv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ip6tables configuration using ip6tables-restore.
parent
4c94cc4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
net-misc/re6stnet/files/grdn-cfg
net-misc/re6stnet/files/grdn-cfg
+0
-2
net-misc/re6stnet/files/grdn-run
net-misc/re6stnet/files/grdn-run
+9
-1
No files found.
net-misc/re6stnet/files/grdn-cfg
View file @
a6678438
...
@@ -45,7 +45,6 @@ re6st-conf --registry "${registry}" --token "${token}" --dir "${configdir}"
...
@@ -45,7 +45,6 @@ re6st-conf --registry "${registry}" --token "${token}" --dir "${configdir}"
printf
'%s\n'
"
${
options
[@]
}
"
>>
"
${
configfile
}
"
printf
'%s\n'
"
${
options
[@]
}
"
>>
"
${
configfile
}
"
echo
"
echo
"
*filter
:FORWARD ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT DROP [0:0]
:OUTPUT DROP [0:0]
-A INPUT -p udp -m udp --dport 6696 -j ACCEPT
-A INPUT -p udp -m udp --dport 6696 -j ACCEPT
...
@@ -54,7 +53,6 @@ echo "
...
@@ -54,7 +53,6 @@ echo "
-A INPUT -p tcp -m tcp --dport 50005 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 50005 -j ACCEPT
-A OUTPUT -p udp -m udp --dport 6696 -j ACCEPT
-A OUTPUT -p udp -m udp --dport 6696 -j ACCEPT
-A OUTPUT -p udp -m udp --dport 326 -j ACCEPT
-A OUTPUT -p udp -m udp --dport 326 -j ACCEPT
COMMIT
"
>
"
${
configdir
}
/ip6tables.conf"
"
>
"
${
configdir
}
/ip6tables.conf"
if
[
$save
-a
$place
]
;
then
if
[
$save
-a
$place
]
;
then
...
...
net-misc/re6stnet/files/grdn-run
View file @
a6678438
...
@@ -61,6 +61,7 @@ fi
...
@@ -61,6 +61,7 @@ fi
# saving firewall configuration
# saving firewall configuration
ip6tables-save
>
"
${
configdir
}
/ip6tables.save"
ip6tables-save
>
"
${
configdir
}
/ip6tables.save"
cp
"
${
configdir
}
/ip6tables.save"
"
${
configdir
}
/current_ip6tables.conf"
# clean before exiting
# clean before exiting
cleanup
()
{
cleanup
()
{
...
@@ -69,6 +70,7 @@ cleanup() {
...
@@ -69,6 +70,7 @@ cleanup() {
echo
"Removing changes in ip6tables rules"
echo
"Removing changes in ip6tables rules"
ip6tables-restore <
"
${
configdir
}
/ip6tables.save"
ip6tables-restore <
"
${
configdir
}
/ip6tables.save"
rm
"
${
configdir
}
/ip6tables.save"
rm
"
${
configdir
}
/ip6tables.save"
rm
"
${
configdir
}
/current_ip6tables.conf"
fi
fi
echo
""
echo
""
exit
0
exit
0
...
@@ -78,7 +80,13 @@ trap cleanup SIGHUP SIGINT SIGTERM
...
@@ -78,7 +80,13 @@ trap cleanup SIGHUP SIGINT SIGTERM
# firewall configuration
# firewall configuration
if
[
-r
"
${
configdir
}
/ip6tables.conf"
]
;
then
if
[
-r
"
${
configdir
}
/ip6tables.conf"
]
;
then
ip6tables-restore <
"
${
configdir
}
/ip6tables.conf"
# remove line containing "COMMIT"
sed
-i
'/COMMIT/d'
"
${
configdir
}
/current_ip6tables.conf"
# add few rules
cat
"
${
configdir
}
/ip6tables.conf"
>>
"
${
configdir
}
/current_ip6tables.conf"
# putting "COMMIT" line back
echo
"COMMIT"
>>
"
${
configdir
}
/current_ip6tables.conf"
ip6tables-restore <
"
${
configdir
}
/current_ip6tables.conf"
else
else
# accept ports needed for re6stnet
# accept ports needed for re6stnet
ip6tables
-P
FORWARD ACCEPT
ip6tables
-P
FORWARD ACCEPT
...
...
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