Oracle oracle free VPS adding ipv6 fully automatic script tutorial

888u

Last update at :2024-01-30,Edit by888u

Oracle free vps, especially the two nodes of Chuncheon, South Korea and Tokyo, Japan, are very popular now. Many friends have applied for Oracle free vps. It now supports IPv6. Although the access from mainland China is general, it is still OK. try it.

How to buy Oracle vps? Visit Oracle's oracle cloud official website and place an order directly. The operation is similar to AWS, and even the operation logic is similar.

Note

This script can only be used after IPv6 has been added and configured in the panel; it supports Debian and Ubuntu systems; CentOS is not applicable. Currently tested on Ubuntu 20.04 and Debian 11 systems. Non-Oracle IPv6, theoretically applicable, not tested.

How to use

Paste them all under the root prompt symbol, or make sh and execute them with bash. You only need to run the script once. It will still be effective when the VPS restarts IPv6; it will automatically identify the system and run the corresponding script.

Debian_IPv6(){ iName=$(ip add | grep "^2: " | awk -F'[ :]' '{print $3}') dhclient -6 $iName #Temporarily enable IPv6 echo $iName #Manually check whether the network card is correct cp /etc/network/interfaces /root sed -i "$ a iface $iName inet6 dhcp" /etc/network/interfaces echo "Reboot... & ping ipv6.google.com After reboot" reboot } Ubuntu_IPv6(){ yamlName=$(find /etc/netplan/ -iname "*.yaml") iName=$(ip add | grep "^2: " | awk -F'[ :]' '{print $3}') dhclient -6 $iName MAC=$(ip add | grep "link/ether.*brd" | awk -F' ' '{print $2}') IPv6=$(ip add | grep "inet6.*global" | awk -F' ' '{print $2}') if [[ ${#IPv6} -lt 5 ]]; then echo "Can't IPv6"; exit 1; fi cp $yamlName /root/ cat <<0099 >$yamlName network: ethernets: ens3: dhcp4: true dhcp6: false match: macaddress: $MAC addresses: - $IPv6 set-name: $iName version: 2 0099 netplan apply sleep 2s ping ipv6.google.com } myOS=$(hostnamectl | sed -n 's_.*System: /(/S*/).*_/1_p') #Ubuntu, Debian if [[ "$myOS" =~ "Ubuntu" ]]; then echo "Ubuntu" Ubuntu_IPv6 elif [[ "$myOS" =~ "Debian" ]]; then echo "Debian" Debian_IPv6 fi

FAQ

  • If Debian or Ubuntu does not move for a long time, it means that the panel IPv6 has not been adjusted properly; Debian needs to be restarted to take effect. Some VPS cannot be adjusted and can only be deleted and reopened.
  • After Debian is finished running, automatic restart will take effect. If the connection is really lost, it is likely that IPv6 is not enabled on the panel. Don’t be afraid of losing connection. Just go to the Oracle background and restart the VPS.
  • Recommended site search: Wanwang domain name space, free personal website server, website registration price, Hong Kong host, domain name space registration, virtual host space, 1g space, ip search, US host, domain name registration website,

    Oracle oracle free VPS adding ipv6 fully automatic script tutorial

    All copyrights belong to 888u unless special state
    取消
    微信二维码
    微信二维码
    支付宝二维码