I want to share a WireGuard VPN connection over WiFi in Raspberry pi 3 B+.
I connect my RPI with LAN port to internet (Huawei 4G modem router),
and I create a WireGuard connection that is already connected (tested ping and traceroute, everything is ok)
But now, I want to share my WireGuard VPN connection over WiFi AP.
I already created a WiFi AP (with internal RPI WiFi) and shared the internet, but the internet is already shared from the LAN connection (same bridge).
And I have another problem: the IP address assigned to the WiFi client gets it IP from the Huawei 4G modem route (192.168.8.X), and its default gateway is set to 192.168.8.1 (Huawei 4G modem route IP address).
What can I do?
With a blank init.lua, whenever I reboot the NodeMCU:
=wifi.sta.getip()
192.168.1.108 255.255.255.0 192.168.1.1
Where is it getting this 192.168.1.108? At one time a couple of weeks ago, I was testing the wifi module. When it connected it was with this ip.
How can that info be hanging around? Or is this some sort of internal ip that NodeMCU uses?
The answer is in the docs for wifi.sta.config:
Station configuration will be retained until changed even if device is turned off.
So, if you used wifi.sta.config("ssid", "password") in the past the device will try to connect to the WiFi "ssid" and obtain an IP (from the DHCP server) whenever it boots.
They say that IP addresses between the range 10.0.0.0 up to 10.255.255.255 can be used in private networks.
My work’s network has about 200 computers connected to each other using plain switch. At my office I own 2 computers which are connected to the network. The following configuration is true.
My PC1
IP: 10.10.20.113
Windows XP
Firewalls Off
No Proxy
Accessing PC2 from Firefox Browser using http://10.10.20.20 (It Works)
My PC2 (server PC)
IP:10.10.20.20
Windows XP, Apache Server
Firewalls Off
No Proxy
Server on this PC spits its homepage through the network at http://10.10.20.20
My private/local server above (PC2 with IP: 10.10.20.20) can be accessed only by Computers with IPs between the range 10.10.20.0 up to 10.10.20.255. A computer on the network that has an IP e.g. 10.10.30.30 throws a time out error. If I change Server's IP to 10.10.30.30 it works on networked computers in the IP range 10.10.30.XX but not on networked computers in the IP range 10.10.20.XX
How can I make my private server be accessed on any computer at the same private network with any IP addresses between the whole private range from 10.0.0.0 up to 10.255.255.255 ? Why god makes life difficult?
Thank U in advance !
It appears that your network has a mask length of /24. That means that the mask is 255.255.255.0. To access a network outside your network, you need a router. You wrote that you only have a switch so you need to add a router to route between networks.
Devices in the network 10.10.20.0/24 can only connect to devices in the 10.10.20.1 to 10.10.20.254 range. The 10.10.30.0/24 network has a range of hosts from 10.10.30.1 to 10.10.30.254. They are two different networks, and you need a router to route between those networks.
I have a laptop with only one Ethernet port and I connect to the internet through it using DHCP to get my IP. I also have a LAN which needs to connect to the Internet. The ONLY way to achieve this is using the laptop's Ethernet port.
I created an alias for en0 and allowed me to connect to the LAN.
The problem would be how to share the Internet using the same Ethernet port from the DHCP IP(which I set up using the Network Settings) to the alias(different IP) for the LAN. Again both IPs are on the same physical interface.
Thanks
You would have to set up a separate IP network space, add a secondary address to your ethernet interface, and run natd on your laptop to translate and route between the networks.
(of course putting all your other devices on the secondary network).
Is there a way to find out the IP address of a device that is directly connected to a specific ethernet interface? I.e. given one host, one wired ethernet connection and one second host connected to this wired connection, which layer or protocol below IP could be used to find this out.
I would also be comfortable with a Windows-only solution using some Windows-API function or callback.
(I know that the real way to do this would probably via DHCP, but this is about discovering a legacy device.)
Mmh ... there are many ways.
I answer another network discovery question, and I write a little getting started.
Some tcpip stacks reply to icmp broadcasts.
So you can try a PING to your network broadcast address.
For example, you have ip 192.168.1.1 and subnet 255.255.255.0
ping 192.168.1.255
stop the ping after 5 seconds
watch the devices replies : arp -a
Note : on step 3. you get the lists of the MAC-to-IP cached entries, so there are also the hosts in your subnet you exchange data to in the last minutes, even if they don't reply to icmp_get.
Note (2) : now I am on linux. I am not sure, but it can be windows doesn't reply to icm_get via broadcast.
Is it the only one device attached to your pc ?
Is it a router or another simple pc ?
To use DHCP, you'd have to run a DHCP server on the primary and a client on the secondary; the primary could then query the server to find out what address it handed out. Probably overkill.
I can't help you with Windows directly. On Unix, the "arp" command will tell you what IP addresses are known to be attached to the local ethernet segment. Windows will have this same information (since it's a core part of the IP/Ethernet interface) but I don't know how you get at it.
Of course, the networking stack will only know about the other host if it has previously seen traffic from it. You may have to first send a broadcast packet on the interface to elicit some sort of response and thus populate the local ARP table.
Windows 7 has the arp command within it.
arp -a should show you the static and dynamic type interfaces connected to your system.
Your Best Approach is to install Wireshark, reboot the device wait for the TCP/UDP stream , broadcasts will announce the IP address for both Ethernet ports
This is especially useful when the device connected does not have DHCP Client enabled, then you can go from there.
You can also get information from directly connected networking devices, such as network switches with LDWin, a portable and free Windows program published on github:
http://www.sysadmit.com/2016/11/windows-como-saber-la-ip-del-switch-al-que-estoy-conectado.html
LDWin supports the following methods of link discovery: CDP (Cisco Discovery Protocol) and LLDP (Link Layer Discovery Protocol).
You can obtain the model, management IP, VLAN identifier, Port identifier, firmware version, etc.