Recently, I set up the K8S development environment and set up the agent, but it is still not convenient.
Still need to solve network anomaly problem completely.
The final network optimization is koolshare + virtualBox + KoolSS
Make sure you install a newer version of virtualBox if you need to download it here at www.virtualbox.org/
Install a little…
Open the virtualBox host Network manager
See that the IP segment of vboxnet0 is 192.168.56.1/24
We’re going to need it later
Koolss download address, need your own Internet search…
Koolshare download site for the latest version of the link
The firmware. Koolshare. Cn/LEDE_X64_fw…
Find the openwrt koolshare -… x86-64-combined-squashfs.img.gz
Version v2.33
Download complete unlock get koolShare… vmdk
Open the virtualBox
Create a new vm and enter the name koolshare1 Linux /64-bit memory 512MB is enough
Virtual disk, select [Use existing virtual disk file]->[register]->[select the file just decompressed] behind the audio can be closed
Do not start the VM
Open virtual Machine [Settings]->[Network]
Nic 1->[host-only]
Nic 2->[Bridge nic] Select the nic you want to access (en0:WiFi(AirPort) for MAC)
Save Settings
Starting a VM
The VM starts and accesses the console
Vi /etc/config/network Modify LAN node option ipaddr ‘192.168.56.11’
And change the password
# Restart the network
/etc/init.d/network restart
# Change your password
passwd
Copy the code
Open your browser at http://192.168.56.11/
Check the network interface
LAN is 192.168.56.11
Wlan is an automatically assigned IP address
Open cool Software -> Offline installation -> upload the koolSS installation package just found
After successful installation
Open coolSoft -> KOOLSS, enter ss_SSR information (first use the domestic IP whitelist mode), and check the running status of KOOLSS
✓ The ✓ from abroad (2020-04-27 10:56:10), the ✓ from home (2020-04-27 10:56:10)Copy the code
Check whether the DNS is normal on the MAC terminal
Dig www.baidu.com @192.168.56.11 dig www.google.com @192.168.56.11Copy the code
Finally, change the default gateway of the MAC address to 56.11
#netstat -nr
Delete the default gateway
sudo route delete default
Add the default gatewaySudo route add default 192.168.56.11 Netstat -nr Routing tables Internet: Destination Gateway Flags Netif Expire Default 192.168.56.11 UGSc Vboxnet 127 127.0.0.1 UCS LO0 127.0.0.1 127.0.0.1 UH 169.254 the link lo0#8 UCS en0 !
169.254.169.254 link#8 UHRLSW en0 !
192.168.1 link#8 UCS en0 !
Copy the code
# validate request
curl cip.cc
curl httpbin.org/ip
curl ip.sb
Copy the code
# Change the local DNS
192.168.56.11
223.5.5.5
Copy the code
Note that if your virtual machine is not started, your network is down. If you need to restore
Restore the original default mode
sudo route delete default
Add the default gatewaySudo route add default 192.168.1.1# Resolve the network exception pattern
sudo route delete default
Add the default gatewaySudo route add default 192.168.56.11Copy the code
Start a VIRTUAL machine and verify the network
mkdir -p box/centos-7
cd box/centos-7
vagrant init centos/7
vagrant up
vagrant ssh
# under the validation
curl -v https://google.com/
Copy the code