Linux network security Model and iptables detailed (1)

Source: Internet
Author: User

Linux network security model and iptables explanation


Basic concepts

Firewall: Works on the host or network edge, checks incoming and outgoing messages according to pre-defined rules,

And a set of hardware or software that is processed by matching rules, or even a combination of the two


Hardware firewall: A firewall that implements some features at the hardware level: Another part of the functionality is based on software implementation

Software firewall: Application software processing logic running on the general hardware platform on the firewall;



Host firewall : Works on the edge of the host and can only protect a single host

Network firewall : Work at the edge of the network to protect multiple hosts (orientation rules)


iptables: Firewall rule Authoring tool, located in user space

netfilter: Network filter, is a framework (let the rules take effect), in the kernel space


650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/8B/04/wKioL1hCTS_DyVf6AAAtAbjvZZ8272.png-wh_500x0-wm_3 -wmp_4-s_799099936.png "title=" 1.png "alt=" Wkiol1hcts_dyvf6aaatabjvzz8272.png-wh_50 "/>



650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/8B/08/wKiom1hCTTyQo7aIAAAnb6lXhvU518.png-wh_500x0-wm_3 -wmp_4-s_4109837465.png "title=" 2.png "alt=" Wkiom1hcttyqo7aiaaanb6lxhvu518.png-wh_50 "/>



Message Flow

Message to a process inside this machine: prerouting---input

Messages forwarded by this machine: prerouting--forward-postrouting

A message sent by a process from this machine: output---postrouting


4 table

Filter: Filtering, Firewall nat: Network address translation mangle: disassembling messages, making modifications, and reseal raw: Turn off the connection tracking mechanism enabled on the NAT table



The correspondence between the table and the chain

FORWARD--Filter, mangleinput-to-filter, mangleout-to-filter, mangle, natprerouting--mangle, Natpostrouting--Mangle, NAT


4 Table 5 Chain (Image source network)


650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/8B/04/wKioL1hCTd6QwbiNAACIWPl9d7Y562.png "title=" 3.png " alt= "Wkiol1hctd6qwbinaaciwpl9d7y562.png"/>


Rules:

Pass: Whitelist, default is blocked, only to be able to identify other to release

Block: Blacklist, default is pass, only can identify others to intercept



Check condition

Ip:sip,diptcp:sport,dport,flags (Syn,ack,fin ...) Udp:sport,dporticmp:icmp-type (message type) ...



Processing mechanism:

Drop (Discard), REJECT (Deny, and return) ACCEPT (allow) SNAT (source address translation) DNAT (destination address translation) return (return) REDIRECT (port forwarding) log (log only)



This article is from the "Homecoming" blog, make sure to keep this source http://sixijie123.blog.51cto.com/11880770/1879090

Linux network security Model and iptables detailed (1)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.