当前位置:网站首页>iptables examples
iptables examples
2022-07-19 05:16:00 【azenlijing】
iptables -L -n -v
iptables -L -n -v --line-numbers
iptables -L OUTPUT -n -v --line-numbers
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -D INPUT 4
iptables -t nat -vnL --line-number
iptables -t nat -D PREROUTING 10
iptables -I INPUT 2 -s 202.54.1.2 -j DROP
iptables -L INPUT -n --line-numbers
iptables -A INPUT -s 202.5.4.1 -j DROP
service iptables save
iptables-save > /root/my.active.firewall.rules
iptables-restore < /root/my.active.firewall.rules
service iptables restart
iptables -A INPUT -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -i eth1 -s 192.168.0.0/24 -j DROP
10.0.0.0/8 (A)
172.16.0.0/12 (B)
192.168.0.0/16 (C)
224.0.0.0/4 (MULTICAST D)
240.0.0.0/5 (E)
127.0.0.0/8 (LOOPBACK)
iptables -A INPUT -i eth1 -s 192.168.1.0/24 -p tcp --dport 80 -j DROP
iptables -A OUTPUT -o eth1 -d 192.168.1.0/24 -j DROP
iptables -A INPUT -i eth1 -s 10.0.0.0/8 -j LOG --log-prefix "IP_SPOOF A: "
iptables -A INPUT -i eth1 -s 10.0.0.0/8 -j DROP
tail -f /var/log/messages
grep ‘IP SPOOF’ /var/log/messages
iptables -A INPUT -p tcp --destination-port 22 -m mac --mac-source 00:0F:EA:91:04:07 -j ACCEPT
iptables -A INPUT -i eth1 -p icmp --icmp-type echo-request -j DROP
iptables -A INPUT -s 192.168.1.0/24 -p icmp --icmp-type echo-request -j ACCEPT
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 7000:7010 -j ACCEPT
iptables -A INPUT -s 1.2.3.4 -p tcp --destination-port 80 -j LOG --log-level crit
iptables -Z
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j SNAT --to-source 10.0.0.11
iptables -t nat -A PREROUTING -d 10.0.0.11 -p tcp --dport 2222 -j DNAT --to-destination 192.168.1.11:22
iptables -t nat -I PREROUTING --src 0/0 --dst 192.168.1.5 -p tcp --dport 80 -j REDIRECT --to-ports 8080
iptables -t nat -I POSTROUTING -p tcp -d 4.250.240.2 --dport 2001 -j SNAT --to 4.250.240.1
边栏推荐
- 网络安全学习(二十三)防火墙
- Master Karnaugh map simplification in one minute
- 【PTA】7-24 约分最简分式 (15 分)
- 使用小技巧(一)
- Leshan normal programming competition 2020-b: design web page [prime number]
- 育才项目运行流程
- How to put a "platform" into a small box? (Part 2) technical realization
- Ktor 2.0? Half fragrant embarrassment
- 巴特沃斯(Butterworth)滤波器的设计和幅频特性曲线绘制
- ESM测向误差对定位误差的影响分析
猜你喜欢
2022 -7-18 第八小组 顾宇佳 学习笔记
巴特沃斯(Butterworth)滤波器的设计和幅频特性曲线绘制
2022-7-11 第八小组 顾宇佳 学习笔记(Js)
How to set the oil on the through hole cover when exporting the Gerber file of PCB
When FPM generates packages, the associated Allegro cannot generate packages after it is opened. Solution to the problem
Software engineering final review mind map
Many new features of ktor2.0 were thought of a year ago and have been implemented in the project
虚幻引擎学习(2)
网络安全学习(十七)VlAN
Solution to the problem of constantly popping up blank web pages when opening OrCAD capture CIS in cadence 17.2
随机推荐
育才项目运行流程
第二次实验 静态路由的扩展配置
Servlet概述
2022美赛E题(Finalist Award)建模笔记
Leetcode:20. Valid brackets [three ideas + different language implementation]
“==”与equals的区别
Network Security Learning (XXII) build virtual special lines for companies and branches
Network Security Learning (XX) ACL
2022-7-8 第八小组 顾宇佳 拓展训练
网络安全学习(十二)OSI与TCP
FPGA majority voter (including code)
“重写”和“重载”的区别
CA运行fft版本
Thinkphp5 verification code
浅谈Excel文件解析
我的2020年线上的夏令营总结
川菜菜谱(一)
上海二工大 - 健康日报AutoCheck
Deep parsing ThreadLocal
Secure Code Warrlor学习记录(三)