Connect a android go device to my computers wifi spot and share the vpn
I need to connect a Android Go device to my computers wifi spot, and then allow the device to only go thru my computers vpn client to the internet.Two articles below relate to the topic of sharing vpn, however I need guidance as I am afraid of doing something detrimental to my computer in terminal. Thanks in advance.
https://askubuntu.com/questions/9261...ther-lan-users https://kamranzafar.org/2012/08/16/s...tion-on-linux/ |
Thanks for the articles - I'm intending to try something similar myself. The sensible way to do it is to get a wired connection for your vpn box, and make the WIFI an access point for the house. Otherwise you'll have endless wifi trouble. I was going to tackle it:
EDIT:I should say I have a RazPi 4 on here 24/7 running linux to make the rest of what I said intelligible. |
Quote:
Code:
cat /proc/sys/net/ipv4/ip_forward #(this should return `1`) |
Yes, it is basically harmless. ip_forward routes traffic from one interface to another. It is usually set to disable (0) at start so rebooting will restore defaults. To set permanent you need to change the sysctl.conf file.
|
Quote:
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward # to set IPV4 forwarding |
Should I be expecting something more after the greater than sign?
Code:
$cat /proc/sys/net/ipv4/ip_forward #(this should return `1`) Code:
$cat /proc/sys/net/ipv4/ip_forward #(this should return `1`) |
Without actually seeing the output no one can tell either.
Is the wifi adapter USB or builtin? If USB post the output of the lsusb command. If builtin show us the output of the lspci command specific to the wireless adapter. |
Quote:
Quote:
Code:
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter |
What distribution are you running? Looks like this wireless adapter needs at least a 5.2 kernel.
https://linux-hardware.org/?id=pci:1...3b-3750&page=1 I don't know if this adapter is capable of being an access point but you can test it via the command sudo iwconfig <adapter ID> mode master |
Quote:
Quote:
Or is that a typo? That will error. |
Quote:
Quote:
Code:
sudo iwconfig 10ec:c822 mode master |
Quote:
Without the backtick Code:
echo '1' >> /proc/sys/net/ipv4/ip_forward |
The device ID in the old days would be wlan0 with consistent naming it is something like wlxxxxxx.
It the device is recognized correctly it should be seen in the output of iwconfig, ip or ifconfig. The single quotes around the 1 just prevent the shell from interpreting any special characters. You have to be root or use sudo to write to /proc Should be a single >. I have never tried to see what happens if you use two. The > is redirection, a single > over writes the destination file, >> appends. |
Quote:
Code:
iwconfig |
Yes, that is it.
|
All times are GMT -5. The time now is 04:20 PM. |