website Registration, the user obtains the verification code to fail, after the website development brother reminds, has studied the next fsockopen() and so on function, is summarized as follows
Fsockopen ()
(PHP4,PHP5)
used to open a network link or a UNIX socket link.
that is, since this function will participate in SMS API send and receive, then it is possible that the function opened a UNIX socket link, this time the website development Brothers also confirmed this.
I immediately thought that it was possible to use a stream socket (SOCK_STREAM) in three socket types. Then there will be a 3 -time handshake. Then with the iptables command found that the interaction packet was dropped by the firewall. But this is the only thing that solves a small part of the problem because we have to crawl the ports to make the appropriate firewall rules.
let's look at the process of sending text messages from a Web server.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6B/7D/wKiom1UvHtSTMmcWAAENIF9KljI441.jpg "title=" Qq20150416102952.png "alt=" Wkiom1uvhtstmmcwaaenif9klji441.jpg "/>
According to the flowchart, it is easy to see where the problem may arise, and we make the following mark
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6B/7D/wKiom1UvHuLRS-PPAAEXzyIAyuQ874.jpg "title=" 2.png " alt= "Wkiom1uvhulrs-ppaaexzyiayuq874.jpg"/>
so we grab the packets in these two places, first of all the user interacts with the Web server , the following is the case
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6B/79/wKioL1UvIIjQsGRzAADXYXihom0753.jpg "title=" Qq20150416103014.png "alt=" Wkiol1uviijqsgrzaadxyxihom0753.jpg "/>
We are very easy to observe, in the user request verification code phase, with the port, which for the Web server, it is impossible to drop off, excluded here.
Next, we grab the packet on the server
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6B/7D/wKiom1UvH0nhbQY6AADOYJkQUmI733.jpg "title=" Qq20150416103026.png "alt=" Wkiom1uvh0nhbqy6aadoyjkqumi733.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6B/79/wKioL1UvIK_iFLGUAAG7xHIea8U607.jpg "title=" Qq20150416103038.png "alt=" Wkiol1uvik_iflguaag7xhiea8u607.jpg "/>
found that the server accesses the SMS website API When the use of a port, and the server itself is a randomly assigned to a port, so was dropped by the firewall . Therefore, you need to debug firewall rules.
Troubleshooting.
think: So we can not guess, any such SMS registration site will have this bug. Perhaps I have limited understanding of the iptables, as far as I know, whether it is the location of the source or target, or more ruthless point, both are limited, will be open with the larger authority, the corresponding will also be a weak site defense.
If you think wrong, you are welcome to spit Groove!
END!
This article is from the "were Willing" blog, make sure to keep this source http://changbo.blog.51cto.com/1316452/1633299
Web server does not send text messages properly