Reverse tethering (ການແບ່ງປັນອິນເຕີເນັດແບບຍ້ອນກັບ)¶
ບົດຮຽນນີ້ຈະອະທິບາຍວິທີການເຮັດໃຫ້ອຸປະກອນ Ubuntu Touch ຂອງທ່ານອອນໄລນ໌ ໂດຍໃຊ້ສາຍ USB ແລະ ຄອມພິວເຕີ Linux ທີ່ມີອິນເຕີເນັດ. ສິ່ງນີ້ມີປະໂຫຍດໃນກໍລະນີທີ່ບໍ່ມີ Wi-Fi ຫຼື ທ່ານບໍ່ມີແພັກເກັດດາຕ້າໃນອຸປະກອນຂອງທ່ານ.
ຂັ້ນຕອນການຕັ້ງຄ່າ Reverse Tethering¶
ກຽມ ອຸປະກອນ (Ubuntu Touch) ແລະ ຄອມພິວເຕີ (Linux) ຂອງທ່ານ:
ເຊື່ອມຕໍ່ ຄອມພິວເຕີ ຂອງທ່ານກັບອິນເຕີເນັດ.
ເຊື່ອມຕໍ່ ອຸປະກອນ ຂອງທ່ານເຂົ້າກັບ ຄອມພິວເຕີ ຜ່ານ USB.
ປິດ Wifi ແລະ ຂໍ້ມູນມືຖື (Data) ໃນ ອຸປະກອນ ຂອງທ່ານ
ຕັ້ງຄ່າອຸປະກອນຂອງທ່ານ usb in tethering mode
ແລ່ນຄຳສັ່ງຕໍ່ໄປນີ້ໃນ ອຸປະກອນ ຂອງທ່ານ:
ປິດການເຊື່ອມຕໍ່ tethering:
sudo nmcli connection down tetheringແກ້ໄຂການເຊື່ອມຕໍ່ tethering:
sudo nmcli connection modify tethering ipv4.method auto
ແລ່ນຄຳສັ່ງຕໍ່ໄປນີ້ໃນ ຄອມພິວເຕີ ຂອງທ່ານ:
Get your interface name:
ip route show to default via 10.42.0.1default dev enx122626d0fe26 proto dhcp src 10.42.0.118 metric 101
ຊື່ interface ຂອງທ່ານແມ່ນ:
enx122626d0fe26Get your connection name:
nmcli --field GENERAL.CONNECTION device show enx122626d0fe26GENERAL.CONNECTION: Wired connection 2
ຊື່ການເຊື່ອມຕໍ່ຂອງທ່ານແມ່ນ
Wired connection 2ປິດການເຊື່ອມຕໍ່:
nmcli connection down "Wired connection 2"ປ່ຽນວິທີການ ipv4 ເປັນ
shared:nmcli connection modify "Wired connection 2" ipv4.method sharedເປີດການເຊື່ອມຕໍ່ຄືນໃໝ່:
nmcli connection up "Wired connection 2"
ສຸດທ້າຍ ໃຫ້ແລ່ນຄຳສັ່ງຕໍ່ໄປນີ້ໃນ ອຸປະກອນ ຂອງທ່ານ:
ເປີດການເຊື່ອມຕໍ່ tethering ຄືນໃໝ່:
sudo nmcli connection up tethering
You should now have a working internet connection on your device!
ການແກ້ໄຂບັນຫາ¶
If the above steps don't give you working internet connection on your device then try these steps on your computer:
ເປີດໃຊ້ IP forwarding:
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forwardນຳໃຊ້ກົດ (Rule) ຂອງ forwarding iptables:
sudo iptables -P FORWARD ACCEPT