博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
配置作为客户机的iptables规则 - ArchLinux
阅读量:4176 次
发布时间:2019-05-26

本文共 1027 字,大约阅读时间需要 3 分钟。

配置作为客户机的iptables规则 - ArchLinux
# cat /proc/version
Linux version 3.7.9-2-ARCH (tobias@T-POWA-LX) (gcc version 4.7.2 (GCC) ) #1 SMP PREEMPT Mon Feb 25 12:04:25 CET 2013
# allow ping & ESTABLISHED,RELATED connectivity
iptables -A INPUT -p icmp -j ACCEPT
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
# ref: cat /etc/iptables/simple_firewall.rules
# allow all traffic from loopback interface
iptables -A INPUT -i lo -j ACCEPT
# only allow ssh port
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
# reject all other than above
iptables -A INPUT -j REJECT
# review rules
iptables -nvL
# check where to save
cat /etc/conf.d/iptables
# save rules
iptables-save > /etc/iptables/iptables.rules

# enable & reload rules

systemctl is-enabled iptables.service
systemctl enable iptables.service
systemctl start iptables.service
systemctl reload iptables.service
systemctl status iptables.service
# ref: https://wiki.archlinux.org/index.php/Iptables

REF:
1. IptablesHowTo
https://help.ubuntu.com/community/IptablesHowTo

转载地址:http://aitai.baihongyu.com/

你可能感兴趣的文章
MySQL数据库管理-体系结构
查看>>
软考UML
查看>>
信息系统的生命周期各阶段及说明
查看>>
Ubuntulinux离线安装ClamTk杀毒软件步骤和使用方法
查看>>
摆脱贫穷2021V1
查看>>
Android.Could not find *.apk
查看>>
JNI
查看>>
Android基于TranslateAnimation的动画动态菜单
查看>>
android NDK中的GCC编译器
查看>>
Android NOtification 使用
查看>>
Android的SharedPreferences保存与删除数据简单实例
查看>>
android 如何从sqlite读取数据到spinner下拉中显示
查看>>
Android实现开机自动运行程序
查看>>
最近几天搭建MySql且连接问题总结
查看>>
搭建Tomcat
查看>>
在MyEclipse中运行tomcat出现Error initializing endpoint错误
查看>>
JSP文件中的上传功能(JSP中的相对路径)------JSP
查看>>
jsp中上传文件的源代码
查看>>
使用SQL语句查询表中重复记录并删除
查看>>
将xml中的数据导入到数据库
查看>>