I made a remote control vehicle with a Raspberry Pi, but i am linked to a wifi router. I decided to make the Pi itself some kind of router to connect directly to it. I downloaded and set up hostapd, set the own_ip_addr=127.0.0.1. When i ping 127.0.0.1, i get responses, but i can't ssh at that address.
Any help is welcome. If you have any idea other than hostapd, please tell me. I just want to control the Pi via wifi without a router.
127.0.0.1 is the local address, and not valid external to the Pi...
If you want to connect to the Pi externally, you must find the Pi's network IP.
You could find this by running ip addr show on the Pi, and taking note of the IP for the interface you are using.
Then just use that IP when you try SSHing.
Related
I recently tried to configure port fowarding on my raspberry pi, to be able to connect through it from anywhere. So, I changed my box parameters to permit it.
It seems to work, as my raspberry pi is responding. But I still use the pi username, and it seems to cause the rejection of the connection. When I try to connect to my raspberry pi, the following message appears:
PS C:\Users\MyUser> ssh pi#xx.xx.xx.xx
You are trying to login with the default username.
For security reasons this can only be done from a local network or console.
pi#xx.xx.xx.xx's password:
Permission denied, please try again.
Of course, I can assure you that the password I enter is correct. When I'm connected to my local network, even if I'm using the ip adress of my box (the one with the ip forawrding) to connect to my raspberry pi, it works perfectly. But if I try from another network, this message appears.
I've been trying to search on internet how to solve this problem but couldn't find anything, event by trying to modify the sshd config.
Any clues to remove this behavior and allow me to connect to my raspberry pi, from a distant network, only with a port redirection (yeah I've heard about tunnelin, pitunnel, etc but that's not what I'm looking for) and without changing the username (Yes I'm aware that chaning it will allow me to ssh succesfully but that's not what I'm looking for) ? Thanks in advance.
Hi I have a raspberry Pi 4 at my house running a ssh server. To access that remotely I managed to use ddclient, to use a domain name and keep same domain even if my dynamic public IP changes. I tried to start port forwarding but this didn't work. I have premium Termuis account. I want to know it's there any way for me to port my internal ip using termuis.I don't want to use ngrok as it has limitations.I am not a network wizard. I checked https://whoer.net/ it said proxy = no. Any Help would be greatful 🙏
I used sudo raspi-config, went into the advanced options, enabled ssh and tried with and without rebooting after this step, I am still getting Network Error: Connection refused
when trying to establish a connection via PuTTY
EDIT: It seems like the device isn't even connected to the network, even though I use DLAN to get it connected directly to the broadband router, the same DLAN I use to connect my primary desktop.
Have you checked your firewall?
I know that this is an old question, but I run into this same problem today when connecting to raspberry with Putty. In my case, the problem was that I used wlan instead of ethernet cable, and hostname -i gave the wrong Ip address.
I then run ifconfig, and realized that there was different Ip address for wlan. With that Ip address, Putty and Filezilla connected right away to my raspberry.
Hope that this will help someone.
Goal
I am trying to setup a secure connection to a PC in our network.
The goal is to be able to access a domain, api.mydomain.test, on that PC, that is served by Apache.
Setup
To securely connect to the server, I have implemented the Softether VPN Server on the PC. The VPN network must be separate from our own local network, which the PC is also on.
The idea is to add an IP whitelist in the vhost record op Apache to allow only people on the VPN subnet to connect to the domain api.mydomain.test. Next to this filter, we also added a firewall to the PC to not allow any connection on port 80 or 443.
Issue
I can connect to the VPN perfectly and receive an IP ofthe subnet 10.11.12.x.
However, I can't seem to be able to access the server on localhost or via the IP of the other network the PC is on (10.10.2.x).
To be frank, I don't even know how to do this when connected to the VPN.
What have I tried?
Use a local tap bridge instead of virtualNAT and virtual DHCP.
This was not working as expected, because then the VPN clients (my laptop) did not receive an IP.
Add routes to allow 10.11.12.x IPs to access localhost.
According to documentation of Softether, the virtual NAT does not use the routes, so this would be useless for our goal.
What I do not know, is how this is normally setup?
I have the feeling I am trying to do this the wrong way, so any ideas or different approaches would be greatly appreciated!
I am running an Ubuntu server with my laptop through an Orcale VirtualBox and I try to maximize the bandwidth of my home server, as it really slows down my internet connection. My router supports up to 300Mbit upload/download speed and my laptop wifi's card up to 150bit.
I configured my server with the following(static IP, configured by vim /etc/network/interfaces):
auto eth0
iface eth0 inet static
address 192.168.1.240
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1
192.168.1.1 is my default gateway, and I just configured a static IP which ends with 240.
When my laptop's WIFI is on, I can easily access the server's files(.html files etc) through chrome from any computer on my house, as I just need to enter the server's IP into the browser, plus I can access the server through SSH. But when It's off, I can't even access the server's HTML files through the laptop itself, though I can see that the server is still running on VirtualBox. When I turn the WIFI once again, I can run services which require Apache2 but they really slow my internet connection, as a result I can barely surf the web. I am trying to configure the server to use only the bandwidth of my router, since my actual internet connection is 30 Mbit download and 1.90 Mbit upload(according to speedtest), and It probably interferes with it. Is it possible to access the server without WIFI connection, so it will purely use my router's speed?
Any help would be appreciated.
1) Looks like you using bridged networking in VM config. When your network adapter is connected to real network - you can interact with your VM via network bridge. When it's not connected - your bridge is also closed. If you need to interact with your VM without WiFi connection - you can add one more virtual network adapter to you VM config: use "Host-only" adapter and configure it on both VM and host PC. Your VM will use new host-only adapter to interact with your PC, and old bridged adapter to interact with other network.
2) Check your WiFi speed near the router. Maybe it's too far or provides too weak signal.
PS. Sorry for my poor english.