Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Iptables study notes

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Three filtered points (chains):

Ingress INPUT

Export OUTPUT

Forward FORWARD

Handling method:

DROP

ACCEPT

REJECT

LOG

-A-- append

-D-- delete

-I-- insert

-R-- replace

-L-- list

-F-- flush

-Z-- zero

-N-- new

-x-- delete-chain

-p-- policy

-E-- rename-chain

-p-- proto

-s-- source

-d-- destination

-I-- in-interface

-j-- jump

-m-- maatch

-n-- numeric

-o-- out-interface

-t-- table

Iptables-An INPUT-p ipmp-j DROP

Iptables-An INPUT-p tcp-d (target ip)-- dport 21-j DORP

Iptables-L-n view

Iptables-F clear # clear before configuration

Determine the purpose of the server, for example:

Hhtp server, only open 80, in addition, easy to manage open 22

Iptables-An INPUT-p tcp [- d 10.0.0.8]-- dport 22-j ACCEPT

Iptables-An OUTPUT-p tcp [- s 10.0.0.8]-- sport 22-j ACCEPT

Iptables-P INPUT DROP

Iptables-P FORWARD DROP

Iptables-P OUTPUT DROP

Iptables-L-n

Iptables-An INPUT-p tcp [- d 10.0.0.8]-- dport 80-j ACCEPT

Iptables-An OUTPUT-p tcp [- s 10.0.0.8]-- sport 80-j ACCEPT

Service iptables save = = iptables-save > / etc/sysconfig/iptables

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report