Looking for the same solution to another problem:
I’m testing a new pool management controller that unfortunately communicates with an Android app only via Bluetooth.
The problem in my case is that the whole pool machine room (including the controller) is built underground, so need to be inside there to connect the app to the controller, which makes the app ...
I'd add as a comment to the other answer(s) but can't due to 'reputation' limitations.
It sounds like a default route problem. Do a 'route' command before and after you experience this problem.
When you lose Internet, you may find that your 'default route' is pointing at your internal network, not the Internet on your externally facing interface.
You have not specified OS - I assume some version of Raspbian.
When I define an static IP for eth0 (Editing /etc/network/interfaces) then the wifi stops working
This is normal behaviour for Debian networking and as you have only listed part of your /etc/network/interfaces who knows exactly.
I could elaborate, but as this is effectively obsolete suggest ...
Connection drops after some time, inexplicably to me.
It has happened because of your configuration since the network manager has changed on newer Raspbian. Please add the static IP according to the /etc/dhcpcd.conf for the eth0.
Leave the /etc/network/interfaces with:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is ...
As of 2020, the only thing that works for me is:
sudo ifdown --force wlan0
sudo ifup wlan0
Tested it in the following way:
Edit network ssid and psk in /etc/wpa_supplicant/wpa_supplicant.conf
Followed by sudo ifdown --force wlan0
Followed by sudo ifup wlan0
The tests were carried out on Buster-lite.
It has been tested atleast 5 to 7 times with time ...
You don't need to configure the static IP address for wlan0. By default, the Android Hotspot Tools has a DHCP server that answers the DHCP IP request of Raspberry Pi wlan0 and then it gives an IP randomly.
If you are concerned about how to connect to raspberry pi without knowing the IP address, the answer is the hostname.
Install NetX Network Tools on ...
I don't know Android but making a phone a hotspot does not magically turn it into a router.
Hotspots are to give you internet access.
Use a router or attempt to find a router app.
Setting a Static IP address for a hotspot seems strange. Hotspots should provide DHCP
Just some general information first to understand the different setups. In the first setup you have an access point on the RasPi with interface wlan0 that can other devices connect by WiFi. The wired interface eth0 is connected as uplink to the internet router, no matter if it also has an access point. That isn't used in this case.
The RasPi is an access ...
I made a tutorial on how to implement OLSRd on Raspberry Pi (Raspbian OS)
Check it out, and let me know what you think and how I can improve it:
OLSRd Tutorial on my Github
It has all of the files that you need for configuration and is nice because it does not automatically go into Ad-Hoc / mesh mode at boot. Instead you run a shell script in order to put ...
From your statements:
[The] "Pi stopped being detected over network"
[You] "gave a static address to my pi"
It appears you're describing a DHCP issue. Sounds like your Pi is not being assigned an IP from the router's DHCP server.
It further appears that you proved the Pi's Ethernet port is working from your statement:
1. DHCP: Use Static IP:MAC Address Mapping
If your Pi is not maintaining a persistent IP address, you can create a static IP:MAC address mapping on the DHCP Server (probably your router). Then, every time the router see's your Pi's MAC address, it will assign the same IP.
2. DHCP: Wrong IP Pool being used by DHCP Server
If your Pi is being ...
Testing for an open port in torrent clients is done by sending a request to a special server which then tries to "call back" on a given IP:PORT. Obviously, this will not work without the Internet, but it's also not the problem.
Trackless torrents need to contain valid nodes in order to start communication:
nodes = [["<host>", <port>], ["<...
What you have purchased isn't only an antenna to replace the built-in antenna (I don't believe that's possible), it is a complete new WiFi transmitter/receiver that can be used in addition to the built-in WiFi. If you do not need the built-in WiFi so just don't configure/use it. You can also completely disable it by adding this option to /boot/config.txt:
First some general information to get an idea what to do. As you already have found there are in general two ways to configure a Virtual Private Network: a bridged setup on OSI Layer 2 and a routed setup on OSI Layer 3.
Nowadays we have mainly two VPN programs that are mostly used: the modern and up comming Wireguard and meanwhile classic OpenVPN. I would ...
As I suspected, the problem was not because of nat or subnetting but because of wrong ip routes. I explained the solution here:
Short answer: Make sure all your devices are routing the traffic for the global ipv6 addresses to their respective local ones.
According to the commands output you have given about the configuration, bonding looks good so far. That all interfaces have the same mac address is due to bonding and will not confuse the fritz box router. Quite contrary it ensures that it does not sense the change of an interface on the fly because the mac address doesn't change. That's the trick of ...
I had no trouble setting up my Pi 4 using Raspbian Buster as a NAS. I installed Samba and only had to manually edit a couple of text files to get a 2 TB USB drive shared. This page at raspberrypi.org is what I used. Another possibility might be to use an OS specifically designed to run a NAS such as OpenMediaVault.
This is a combination of M. Rostami's answer and my reflections on his answer, which I found cumbersome to add as comments.
NB: Your question shows you know how to find your public IP address and the internal address of your Pi. I've included directions here in the hope that they will help others.
On your Pi, set up SSH on the default port number, port 22....
Port forwarded ~ 21 both TCP and UDP
It's actually forward packets to port number 21 which is the default port of FTP. You must change it to port number 22 on your router/switch.
If you are stubborn about changing the default port of SSH which is 22 to another port number, take note that you can set the SSH default port to 21 but the FTP client would be ...
Provided that the SSH server at the PI is actually configured to listen on port 21 instead of the default 22, and that the network public IP address doesn't change.
Then you should just SSH to the public IP address of your network.
>ssh 184.108.40.206 21
login the same way as you do when only using the local (home) network.
Using no-ip or dydns can help ...
Here's a TESTED and WORKING specimen config from my MikroTik router that you can use as a model for your own router.
chain=dstnat action=dst-nat to-addresses=192.168.0.6 to-ports=21 protocol=tcp in-interface=ether1-Gateway dst-port=60000 log=no log-prefix=""
"ether1-Gateway" is my connection to Internet
"dst-port=60000" is an ...
First the ssh port is usually port 22 but it can be changed and secondly you only need tcp not udp. Another issue that can crop up is ensuring the pi will accept connections on port 22 from outside your LAN which can be achieved using UFW https://wiki.ubuntu.com/UncomplicatedFirewall
Make sure you set a strong password or better still use SSH keys as you ...
I had a similar problem after installing PiHole. I found this site to be helpful. https://raspberry-projects.com/pi/programming-in-c/tcpip/configuring-network-adaptors
In my case, I had tried to change the PiHole static IP after instalation and I had two IPs in the /etc/dhcpcd.conf file. Once I corrected the error my Pi is working on the wired connection ...
You don't tell us where the other end of the up-/download is located. This has a significant impact. But you should verify that your local network is working properly. You can use iperf for it. I assume your PC has an Unix like operating system running so you can install it there. On a Debian derivative you will do it with:
pc ~$ sudo apt install iperf
The network configuration is configured in /etc/dhcpcd.conf. Just add a line at the end of this file:
This is only an example. Of course you have to use the ip address of your gateway. This will permanently save the gateway address.
But this is only a workaround. Usually the gateway/router address is gotten from the DHCP server ...
You shouldn't manually update the resolv.conf, because all changes will be overwritten by data that your local DHCP server provides. Therefore, the network manager of Raspbian Buster has configured by /etc/dhcpcd.conf. Every configuration of this config file always is overwriting to other network config files on the OS.
All you need is that you should ...
With every network management system, no matter if it is ifupdown, dhcpcd, systemd-networkd or Networkmanager (not supported with Raspbian), you are able to configure what interface (wlan0 or wlan1) is connected to what subnet. You don't tell us anything about your network environment so I can only suggest to look at your network setup how it manages to ...
If the problem is with the DNS server as you can't update the raspbian because of this Temporary failure resolving 'raspbian.raspberrypi.org' error, you should be concerned about the /etc/resolv.conf file. I mean, check the nameservers (which is the DNS server) there.
However, if you want a temporary solution, make comment (by adding #) all lines there ...
ip a is a shortcut for ip address
should be sufficient
There is no need to use sudo if all you are interested in doing is viewing the IP address.
For more information, the man page for the ip utility is available by running:
To verify your problem I have done a plain installation from scratch using the smallest image. Here is what I've done:
Downloaded Raspbian Buster Lite 2019-09-26 onto a PC with Debian operating system.
pi ~$ sha256sum 2019-09-26-raspbian-buster-lite.zip
I fixed the issue by having the computer that I was trying to ping the pi with plug into the router directly instead of having it plugged into a network switch that was plugged into the router.
As for the device being stuck in DORMANT mode, I fixed that using the following command: ip link set wlan0 mode default
My solution -- create a shell script to easily switch between AdHoc mode and internet connected mode
This does not configure OLSRd, it just creates an AdHoc network that you can connect to.
Shell script just copies the locally stored config files over to the location of the active config files
sudo cp /home/pi/adhoc_config/interfaces /etc/network/
Because you started with a fresh flashed Raspbian Buster image so just enable WiFi as described at Wireless connectivity from the Raspberry Pi Foundation. If this doesn't work then you should have a look at the hardware of your RasPi or at the device from which you try to connect.