其實最近一兩個月都會在
emerge –sync
之後, 馬上來一發
emerge –ask -1vUD @world
做 regular system update 的 maintenance
Yet Another Pages
其實最近一兩個月都會在
emerge –sync
之後, 馬上來一發
emerge –ask -1vUD @world
做 regular system update 的 maintenance
Android 從2020年開始在推廣這個東西
去年推出 1.0 並且在前幾天, 推出了 2.0 …
但他到底是什麼 !?
閱讀全文〈Android Graphic Inspector〉
這個其實拖很久…. 之前Gentoo portage把 5.6 放進 deprecated 就該動手
但一直不知道該怎麼做比較好
實際上wordpress滿無痛的…. 不管新舊版都能繼續用 7.3
但更之前的lifetype & gallery 就只能停在5.6…. 雖然沒人會看 但我就想要讓它一直在線 所以目前打算加一檯 rpi3 給他備援….
其實應該能做到 apache + cgi 掛不同version 的 php….但就真的懶
這一波升7.3 其實還遇到問題 並非純無痛 因為沒有裝mysqli …. 這又是啥? 一查之下發現叫做 mysql improve….這命名跟餿味銳迪狗一樣 簡直爛炸了zzzz
13年前的今天考到機車駕照, 那天早上拿到駕照下午就跟大學同學出遊…去哪是忘了, 但那天是七夕情人節XD
的確13年本身是沒啥了不起, 剛好近日新聞又有不要命的恍神騎士……
這其實是在我們這個年代就有的暑期傳說, 24耐, 意即24小時環島一周, 這個如果是指開車, 本身就不是很正常的行為….(但開車24耐難度真的很低)
更何況是騎機車…不過那真的不只是傳說…
A virtual private network (VPN) tunnel is used to securely interconnect two physically separate networks through a tunnel over the Internet. Tunneling is needed when the separate networks are private LAN subnets with globally non-routable private IP addresses, which are not reachable to each other via traditional routing over the Internet. For example, VPN tunnels are often deployed to connect different NATed branch office networks belonging to the same institution.
Sometimes VPN tunneling may be used simply for its security benefit as well. Service providers or private companies may design their networks in such a way that vital servers (e.g., database, VoIP, banking servers) are placed in a subnet that is accessible to trusted personnel through a VPN tunnel only. When a secure VPN tunnel is required, IPsec is often a preferred choice because an IPsec VPN tunnel is secured with multiple layers of security.
This tutorial will show how we can easily create a site-to-site VPN tunnel using Openswan in Linux.
This tutorial will focus on the following topologies for creating an IPsec tunnel.
Usually, you will be managing site-A only, but based on the requirements, you could be managing both site-A and site-B. We start the process by installing Openswan.
On Red Hat based Systems (CentOS, Fedora or RHEL):
On Debian based Systems (Debian, Ubuntu or Linux Mint):
Now we disable VPN redirects, if any, in the server using these commands:
Next, we modify the kernel parameters to allow IP forwarding and disable redirects permanently.
1
2
3
|
net.ipv4.ip_forward = 1 net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.all.send_redirects = 0 |
Reload /etc/sysctl.conf:
We allow necessary ports in the firewall. Please make sure that the rules are not conflicting with existing firewall rules.
Finally, we create firewall rules for NAT.
Please make sure that the firewall rules are persistent.
Note:
The first configuration file that we will work with is ipsec.conf. Regardless of which server you are configuring, always consider your site as ‘left‘ and remote site as ‘right‘. The following configuration is done in siteA’s VPN server.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
## general configuration parameters ## config setup plutodebug=all plutostderrlog= /var/log/pluto .log protostack=netkey nat_traversal= yes virtual_private=%v4:10.0.0.0 /8 ,%v4:192.168.0.0 /16 ,%v4:172.16.0.0 /16 ## disable opportunistic encryption in Red Hat ## oe=off ## disable opportunistic encryption in Debian ## ## Note: this is a separate declaration statement ## include /etc/ipsec .d /examples/no_oe .conf ## connection definition in Red Hat ## conn demo-connection-redhat authby=secret auto=start ike=3des-md5 ## phase 1 ## keyexchange=ike ## phase 2 ## phase2=esp phase2alg=3des-md5 compress=no pfs= yes type =tunnel left=<siteA-public-IP> leftsourceip=<siteA-public-IP> leftsubnet=<siteA-private-subnet> /netmask ## for direct routing ## leftsubnet=<siteA-public-IP> /32 leftnexthop=%defaultroute right=<siteB-public-IP> rightsubnet=<siteB-private-subnet> /netmask ## connection definition in Debian ## conn demo-connection-debian authby=secret auto=start ## phase 1 ## keyexchange=ike ## phase 2 ## esp=3des-md5 pfs= yes type =tunnel left=<siteA-public-IP> leftsourceip=<siteA-public-IP> leftsubnet=<siteA-private-subnet> /netmask ## for direct routing ## leftsubnet=<siteA-public-IP> /32 leftnexthop=%defaultroute right=<siteB-public-IP> rightsubnet=<siteB-private-subnet> /netmask |
Authentication can be done in several different ways. This tutorial will cover the use of pre-shared key, which is added to the file /etc/ipsec.secrets.
1
2
3
|
siteA-public-IP siteB-public-IP: PSK "pre-shared-key" ## in case of multiple sites ## siteA-public-IP siteC-public-IP: PSK "corresponding-pre-shared-key" |
The server should now be ready to create a site-to-site VPN tunnel. If you are managing siteB as well, please make sure that you have configured the siteB server with necessary parameters. For Red Hat based systems, please make sure that you add the service into startup using chkconfig command.
If there are no errors in both end servers, the tunnel should be up now. Taking the following into consideration, you can test the tunnel with ping command.
Also, the routes to the destination’s private subnet should appear in the server’s routing table.
[siteB-private-subnet] via [siteA-gateway] dev eth0 src [siteA-public-IP] default via [siteA-gateway] dev eth0
Additionally, we can check the status of the tunnel using the following useful commands.
IPsec running - pluto pid: 20754 pluto pid 20754 1 tunnels up some eroutes exist
## output truncated ## 000 "demo-connection-debian": myip=<siteA-public-IP>; hisip=unset; 000 "demo-connection-debian": ike_life: 3600s; ipsec_life: 28800s; rekey_margin: 540s; rekey_fuzz: 100%; keyingtries: 0; nat_keepalive: yes 000 "demo-connection-debian": policy: PSK+ENCRYPT+TUNNEL+PFS+UP+IKEv2ALLOW+SAREFTRACK+lKOD+rKOD; prio: 32,28; interface: eth0; ## output truncated ## 000 #184: "demo-connection-debian":500 STATE_QUICK_R2 (IPsec SA established); EVENT_SA_REPLACE in 1653s; newest IPSEC; eroute owner; isakmp#183; idle; import:not set ## output truncated ## 000 #183: "demo-connection-debian":500 STATE_MAIN_I4 (ISAKMP SA established); EVENT_SA_REPLACE in 1093s; newest ISAKMP; lastdpd=-1s(seq in:0 out:0); idle; import:not set
The log file /var/log/pluto.log should also contain useful information regarding authentication, key exchanges and information on different phases of the tunnel. If your tunnel doesn’t come up, you could check there as well.
If you are sure that all the configuration is correct, and if your tunnel is still not coming up, you should check the following things.
To sum up, this tutorial focused on the procedure of creating a site-to-site IPSec VPN tunnel in Linux using Openswan. VPN tunnels are very useful in enhancing security as they allow admins to make critical resources available only through the tunnels. Also VPN tunnels ensure that the data in transit is secured from eavesdropping or interception.
https://guardianproject.info/
這個感覺有點酷
雖然不熟網路工程
不過白話點就是 究極的加密連線, 一種結合p2p概念的網路連接
A to Z 經過的連線路徑是未知
真的滿酷的
下次出差匪區可以試試 XD
APP: https://play.google.com/store/apps/details?id=org.torproject.android&hl=zh_TW