您的位置:首页 > 运维架构 > Linux

How can i use iptables on centos 7 or fedora?

2014-12-28 11:56 190 查看
http://stackoverflow.com/questions/24756240/how-can-i-use-iptables-on-centos-7

#sudoserviceiptablesstart
Redirectingto/bin/systemctlstartiptables.service
Failedtoissue
method
call:Unitiptables.servicefailedtoload:Nosuchfileordirectory.


WithRHEL7/CentOS7,firewalldwasintroducedtomanageiptables.IMHO,firewalldismoresuitedforworkstationsthanforserverenvironments.

Itispossibletogobacktoamoreclassiciptablessetup.First,stopandmaskthefirewalldservice:

systemctlstopfirewalld
systemctlmaskfirewalld

Then,installtheiptables-servicespackage:

yuminstalliptables-services

Enabletheserviceatboot-time:

systemctlenableiptables

Managingtheservice

systemctl[stop|start|restart]iptables

Savingyourfirewallrulescanbedoneasfollows:

serviceiptablessave

or

/usr/libexec/iptables/iptables.initsave


                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: