User Tools

Site Tools


network_iptables

If you want to send us your comments, please do so. Thanks
More on comments


IP tables

Configuration

Set up the rules in /etc/iptables.up.rules
Flush the iptable

iptables -F

Restore the iptable

iptables-restore < /etc/iptables.up.rules\\

Evaluate the iptable

iptables -L

Examples

Creat a chain

iptables -N SSHSECURE
iptables -A SSHSECURE -j LOG --log-prefix "SSH intrusion attempt" --log-level 7
iptables -A SSHSECURE -j DROP

Use a chain

iptables -A INPUT -i eth0 -p tcp -m state --dport 22 --state NEW -m recent --set
iptables -A INPUT -i eth0 -p tcp -m state --dport 22 --state NEW -m recent --update --seconds 240 --hitcount 10 -j SSHSECURE

Witout the chain for ssh

iptables -A INPUT -i eth0 -p tcp -m state --dport 22 --state NEW -m recent --set --name ssh -j ACCEPT
iptables -A INPUT -i eth0 -p tcp -m state --dport 22 --state NEW -m recent --update --seconds 120 --hitcount 7 --rttl  --name ssh -j DROP

iptables example


Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy

RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2022 Webevaluation.nl and the authors
Changes reserved.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
network_iptables.txt · Last modified: 11-07-2020 21:02 by wim