当前位置:网站首页>iptables examples
iptables examples
2022-07-20 10:31: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
边栏推荐
- 【资源记录】流形学习 Manifold learning 和 PCA 的关系
- DHCP服务与配置
- gocore-v2框架发布-集成脚手架能力
- CEPH create storage pool prompt pool size is bigger than the crush rule max size
- [resource record] VAE learning notes
- ceph-deploy配置ceph分布式集群
- Variable influence notes from UCB CS 285 Sergey Levine
- pytorch之nn.Conv1d详解
- Express框架
- FIO test hard disk performance
猜你喜欢
随机推荐
tensorflow tf. Where usage method, greater than a certain value is 1, less than 0
SUSE 11 enter single user
ModuleNotFoundError: No module named 'cv2'
Process and planned task management
进程和计划任务管理
关于基础资源信息查询和关键数据的查看
gocore-v2框架-gocore.yaml配置文件介绍
进程间通信之消息队列(内附相关可执行代码)
[resource record] Introduction to Bayesian neural network (BNN), common packages and differences
【资源记录】VAE 学习笔记
[turn] method to solve memory / video memory leakage pytorch
【资源记录】Bayesian Neural Network(BNN)介绍,常见package及区别
抽象类和接口的区别
Nacos - 配置管理中心(阿里开源)
Lombok配合Logback实现最简单的日志输出
ceph 创建存储池提示pool size is bigger than the crush rule max size
websocket总结
invalid syntax
LVM and disk quotas
The difference between overload and override