Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
iptables
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
certo
iptables
Commits
9865a61b
Commit
9865a61b
authored
May 09, 2019
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added iptables init script - now loading /etc/iptables on start
parent
dcef91a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
Makefile
Makefile
+1
-0
iptables
iptables
+40
-0
No files found.
Makefile
View file @
9865a61b
...
@@ -12,6 +12,7 @@ all: iptables-service
...
@@ -12,6 +12,7 @@ all: iptables-service
@echo
"$$IPTABLES_SERVICE"
>
/lib/systemd/system/iptables.service
@echo
"$$IPTABLES_SERVICE"
>
/lib/systemd/system/iptables.service
ln
-s
/lib/systemd/system/iptables.service
/etc/systemd/system/multi-user.target.wants/iptables.service
ln
-s
/lib/systemd/system/iptables.service
/etc/systemd/system/multi-user.target.wants/iptables.service
install
-v
-m755
iptables
/etc/systemd/scripts/iptables
rm
-rf
iptables-1.8.2
rm
-rf
iptables-1.8.2
iptables-service
:
iptables-service
:
...
...
iptables
0 → 100644
View file @
9865a61b
#!/bin/sh
# Begin /etc/systemd/scripts/iptables
# Enable broadcast echo Protection
echo
1
>
/proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
# Disable Source Routed Packets
echo
0
>
/proc/sys/net/ipv4/conf/all/accept_source_route
echo
0
>
/proc/sys/net/ipv4/conf/default/accept_source_route
# Enable TCP SYN Cookie Protection
echo
1
>
/proc/sys/net/ipv4/tcp_syncookies
# Disable ICMP Redirect Acceptance
echo
0
>
/proc/sys/net/ipv4/conf/default/accept_redirects
# Do not send Redirect Messages
echo
0
>
/proc/sys/net/ipv4/conf/all/send_redirects
echo
0
>
/proc/sys/net/ipv4/conf/default/send_redirects
# Drop Spoofed Packets coming in on an interface, where responses
# would result in the reply going out a different interface.
echo
1
>
/proc/sys/net/ipv4/conf/all/rp_filter
echo
1
>
/proc/sys/net/ipv4/conf/default/rp_filter
# Log packets with impossible addresses.
echo
1
>
/proc/sys/net/ipv4/conf/all/log_martians
echo
1
>
/proc/sys/net/ipv4/conf/default/log_martians
# be verbose on dynamic ip-addresses (not needed in case of static IP)
echo
2
>
/proc/sys/net/ipv4/ip_dynaddr
# disable Explicit Congestion Notification
# too many routers are still ignorant
echo
0
>
/proc/sys/net/ipv4/tcp_ecn
iptables-restore /etc/iptables
# End /etc/systemd/scripts/iptables
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