2013年8月28日星期三

iptable usage


[root @ tp ~] # iptables-A OUTPUT-p tcp - sport 80-j ACCEPT < br /> [root @ tp ~] # iptables-A INPUT-p tcp - dport 80-j ACCEPT


I think the above two lines meaning of the expression is the same, is not as long a line can be?
As below, so long as his can.
[root @ tp ~] # iptables-A INPUT-p tcp - dport 110-j ACCEPT
------ Solution ---- ----------------------------------------
you say is right ; was my first mistake
------ Solution ------------------------- -------------------
Oh, you try to open the input after the output of all data off, and can not communicate, and said the same?
------ Solution ---------------------------------------- ----
it as the same, all right!
------ For reference only -------------------------------------- -
meaning is not the same
1.iptables-A OUTPUT-p tcp - sport 80-j ACCEPT
meaning: Outbound protocol that allows access to external port 80.
role: Can I use my computer, open the page
2.iptables-A INPUT-p tcp - dport 80-j ACCEPT
mean: stop protocol that allows the machine to access my external network port 80.
effect: If the machine is one of my web site, then you can access my external web server provides a web page.
------ For reference only -------------------------------------- -
the meaning of the first sentence of the complete look perfect outbound protocols allow me to port 80 of the machine can also be understood as external access from the inside to the outside to access the web page
- ---- For reference only ---------------------------------------
< br />
your first statement should not it, sport represents the source, so the first one is the outbound protocols, however, provide external access to port 80 instead of accessing external 80, I think, these two kinds of writing, as long as you can retain a.

没有评论:

发表评论