WireGuard VPN WiFi AP - OpenWRT - RPi 3 B+ - raspberry-pi3

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?

Related

SNMP Broadcast in Multiple network interface card installed PC

We have laptop installed with two NIC (WLAN and LAN) which connects to different networks. so it has two different IPs.
In this condition, If we perform SNMP broadcast discovery(using 255.255.255.255) to identify the SNMP compliant devices. We get only the device listed in WLAN and LAN interface IP ranges are not detected.
How can I get all the SNMP-compliant devices connected in the WLAN and also LAN network through SNMP broadcast discovery(using 255.255.255.255) ?
Thank you

Golang cannot send packets to stun received ip

I’m using Golang to try to send packets through UDP to an IP address and port provided by STUN. The goal is to communicate between two devices without having to open a port in the firewall, as both devices are located in a different network.
The program runs on both devices in the following manner:
Device 1 waits for device 2 to send the IP address and port found by STUN. This goes through an open port in the firewall of device 1. (Only for device 1 an open port is possible)
The problem is that device 2 does not receive any packets through the port found by STUN.
I think the problem consists of the router not knowing the connection to device 2. Device 2 is connected with the router, but the router doesn’t know what to do with the packets.
Do you have any idea how to solve this problem?
Thanks!

Ping Raspberry Pi from another computer on the same network

I have set up an ad hoc network between two laptops. One of the laptops is connected directly to the Raspberry Pi via Ethernet. This laptop can ping and SSH into the Raspberry Pi just fine. How do I get the second laptop to be able to ping the Raspberry Pi?
The IP of the Raspberry Pi is 192.168.137.99, the Ethernet ipv4 address of the laptop connected to the Pi is 192.168.137.1, and I have set the address of the Wireless LAN adapter Wi-fi on the second laptop as 192.168.137.2. The second laptop can ping 192.168.137.1, but not 192.168.137.99 (destination host unreachable). The first laptop (192.168.137.1) cannot ping 192.168.137.2, it says destination host unreachable. The subnet masks are all 255.255.255.0. I am pretty new to this so any advice is appreciated.
Usually people use routers for that. Get a home router, ensure it has DHCP server on, connect all 3 devices to the router however you want (with cable or wifi), setup the devices to use automatic IP address, they’ll get 3 IP addresses from the router’s DHCP server, and you’ll be able to ping them however you want.
If you don’t have a router or don’t want to use it, there’s another option. You can setup the laptop that has Pi connected to act as a network bridge. Here’s how. This way this laptop will route these IP packets between your 2 network (one Ethernet with the Pi, another one WiFi with your second laptop). Because it will be no DHCP server on your network, you’ll have to setup IP addresses manually. Make sure all 3 devices use different IP addresses from the same subnet, 192.168.137.* with mask 255.255.255.0 should work just fine.

Raspberry Pi SSH connection over Ethernet fails

I'm trying to establish a connection over SSH from my Win 8.1 laptop to my raspberry pi 3 model B as the host. Connecting over wifi works flawlessly each time, however I need to demo projects in class and the campus wifi does not play well with SSH, our professor stated that we must use an Ethernet connection. I have tried both putty and Bitvise SSH clients with same results - either "connection refused" or "no connection could be made because the machine actively refused it".
I have tried:
Enabling internet sharing on the Ethernet connection and enabling the SSH services (port 22 both TCP and UDP)
Disabling wifi on Win
Forgetting wifi on raspberry
Manually activating SSH server on raspberry even though I'm pretty sure it was activated already.
Deleting SSH keys from the wifi sessions
Completely disabling the firewall
ipconfig /release ipconfig /renew
Restarting both machines after every of the above
Reimaging memory card with newest Raspbian
Any help would be greatly appreciated.
Edit: The link What can be the reasons of connection refused errors? did not help, the listed reasons are closed ports or firewall and as I already said I tried to open the required ports through the shared Ethernet connection and turned off Windows firewall completely with no other firewall programs running. From my understanding Raspbian doesn't come with any enabled firewalls and allows all traffic. Can someone correct me if I'm wrong?
I finally found a guide that works: http://www.circuitbasics.com/how-to-connect-to-a-raspberry-pi-directly-with-an-ethernet-cable/
The crucial step was to set the static IP address of the pi to my laptop's Ethernet adapter address but modify the last part. You're welcome, all you poor souls from the future.

Share Internet on the same interface OS X

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).

Resources