⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 500words.txt

📁 This a good VPN source
💻 TXT
字号:
What is IPsec in 500 words?IPsec is the most commonly used protocol to secure TCP/IP communications over an untrusted network. This basically works in two steps.1) Setup an encrypted negotiation channel (called ISAKMP) to the other end and authenticate each other to prevent a man in the middle attack. 2) Agree on the encryption parameters for the actual tunnel that will be used to send the encrypted data through. These parameters are for example which cipherto use, what strength of the cipher to use (how many bits for the keys) or which algorithm to use. This negotiation is called the Internet Key Exchange protocol (IKE). When everything has been negotiated, the parties will attempt to set up thepromised connection, the "Security Association", or IPsec SA.Once this negotiation has completed, encrypted packets can be send and received by both ends.What is important to know when implementing this is the following:1) Part of these negotiations happen over UDP port 500, or in some cases that involve NAT, over UDP port 4500. Be sure to allow these ports to communicate through your firewalls if you want to deploy IPsec.2) The actual encrypted packets are not "normal IP" packets. People often think   of "IP" as being TCP, UDP and ICMP, but there are many others. In fact, those   are all IP packets with a different protocol number. ICMP is 1, TCP is 6 and   UDP is 9. For IPsec, there are two new kinds of IP packets.ESP: Encapsulated Security Payload. ESP has IP protocol number 50, and is used     for almost all types of IPsec connections. This is also called "tunnel      mode".AH:  Authentication Header. AH has protocol number 51, and is almost never used.     The exception is Microsoft Windows, when it is using "L2TP". This is also     called "transport mode".You will also have to allow protocol 50 (and for L2TP protocol 51) packetsthrough your firewall. Do not confuse these numbers with port numbers! Allowing port 50 will not let ESP packets through. ESP packets have no port numbers at all!If your external firewall is also your VPN server, you could use the followingrules, assuming ppp0 would be your interface to the internet:iptables -I INPUT -p udp --dport 500,4500 -j ALLOW -i ppp0iptables -I INPUT -p esp -j ALLOW -i ppp0iptables -I OUTPUT -p udp --dport 500,4500 -j ALLOW -i ppp0iptables -I OUTPUT -p esp -j ALLOW -i ppp0# only needed for windows L2TPiptables -I INPUT -p ah -j ALLOW -i ppp0iptables -I OUTPUT -p ah -j ALLOW -i ppp0If you get an error about iptables not knowing "esp" or "ah", you can writeit as a number instead. 50 for esp and 51 for ah.If your firewall and VPN server are not the same, be careful to use theFORWARD tables instead of the INPUT/OUTPUT tables. Also be aware of NAT onyour firewalls. You CANNOT use NAT on IPsec packets. For more about NAT,see LINKMost of these negotiations all happen "under the hood". Don't worry if this allseems complex. Configuration is actually fairly easy.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -