how to connect: hotspot(mobile) -> Rasberi Pi (wan) -> Rasberi Pi (eth0) -> router -> devices - raspberry-pi3

I am trying to have the following set up:
connect my Rasberi pi to my hotspot (for internet) via the Wan0 (wirelessly)
2.The Wan will then route the internet via the eth0
3.The Eth0 will act like an ADSL(?) connection to my router
4.The router will then provide the internet wirelessly to the the connected computers
I have a rasberi pi and have tried several methods but could not get it working. A step by step instruction would really help (I am a beginner with linux)
Thanks for all your help
A.

Related

WireGuard VPN WiFi AP - OpenWRT - RPi 3 B+

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?

Iot project With Esp8266 and Pi3 through a Web Browser

I am trying to build a smart home.
I have some Esps to control the peripherals
And I want to use the raspberry Pi as the hub/webserver
The pi would host a website to allow the controls.
I am not sure how to put it all together.
The MCU lib can itself host html.
Any suggestions.
if raspbery pi and esp8266 run in LAN. Thats can communicate via TCP and UDP. UDP is boardcast protocol so it can be reach multiple esp8266 at the same time even if yo dont know ip address of esp8266s. But there is no response for security. TCP is unicast protocol. You have to know esp8266s ip address for using is. You can use UDP for take esp8266 ip address after then you can communate esp8266s via TCP.
if raspberry pi and esp8266 communicate via internet you can use MQTT.
i suggest you learn how create server by using raspberry pi (maybe apache or others) and develop scripts on raspberry pi for using TCP, UDP, MQTT. Also you should study to delevop program for esp8266s.

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.

Setting up domain name redirection on Mac OSX for all! domains

im trying to setup a redirection towards an app that im writing in Java. This app opens a port 8443 on my laptop (which is a MacOS 10.10 Yosemite) and offers a HTTPS service.
The big plan is to have another device connecting to an access point that im setting up on my laptop and when it connects to any ip/domain on 443 this traffic is redirected to my local machine on port 8443.
I need to redirect traffic that im getting on 443 to 8443. I kinda might have gotten a solution for this using the following guide: http://www.abetobing.com/node/81, and changed the rule to rdr pass on lo0 inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443
But this rule only works locally if im right about that. So only traffic coming from my own laptop is redirected. if im trying to open https://192.168.178.25/ on another machine it doesn't work, but https://192.168.178.25:8443/ does.
Additionally i also was able to change a domain via the /etc/hosts file. That only works for local connections and for single domains if im right. So the second step would be to redirect ALL possible domain names to my ip. I think this should be possible with kinda of a proxy service, but since i am new to this topic I haven't found a solution that is working for me.
At the moment I am using 2 Wifi devices and the MacOS Internet share. My USB wifi card is connected to a router and internet. My internal wifi card opens an access point (it says hotspot) and offers the internet connection of the other device. This is annoying, since the USB wifi connection always has to work, otherwise MacOS will shut down the access point. The best solution would be a software opening a reliable access point with the internal wifi card (haven't had any success with the Mac OS ad-hoc network)
I would be so glad if someone would be able to help me out with any of the 3 single parts. Thank you already :)

A confusion about chromecast discover

When I click google cast icon in my chrome browser, it will try to discover whether there is an available chromecast around my pc.
If yes, then it will recognize it (assume that chromecast has already been set and connect to the same router which my pc is connected to).
My first confusion is, during this course, does my pc ever connect to chromecast's own wifi signal? Or they ONLY talk via my router?
My second confusion comes from a test:
I set 2 routers: router_A on top;router_B connects to LAN port of router_A;
My pc also connects to router_A;
chromecast dongle connects to router_B;
multicast/upnp of router B is enabled, firewall on router_B is disabled.
My pc cannot find chromecast in this situation. I'm confused and I think it should work since router_B obtains ip/gateway from router_A.
The third confusion is when I swapped my pc and chromcast, to let my pc connect to router_B, and chromecast connect to router_A, my pc found the chormcast......
After Chormecast is set up with a wifi network, it is discovered through mDNS. For (2) and (3), since discovery is done through multicast/mDNS, you need to read on that topic and look at the configuration settings of your routers to see how you can set things up to get what you want.

Resources