I have that fstab trouble with VM’s sometimes.
No idea why. Manual nfs mount always works.
Maybe during boot something is not available in time.
I’m not sure why, but if I
Then the old ip of .157 is now .191. And if I try to ssh://192.168.1.157, I get “no such file or directory.” But if I ping 192.168.1.157, I get results same as .191.
Maybe I don’t fully understand DDNS, but I thought that was the purpose of installing No-IP on my router, to ensure I can keep the same local IP–“static”. Why is .157 no longer valid in ssh?
I cannot edit /etc/fstab or /etc/hosts until I know the ip address to insert.
UPDATE: I guess you do not put the colon// in terminal. Once I removed that (ssh sflanagan@192.168.1.157) I could ssh into the old IP.
Thanks,
Sheila
Assume you have a local network… separate from the dhcp internet link.
You dont ask what the local IP address of a machine is… you set it … normally by giving an ethernet interface in each machine a static IP number … do it in the ‘Advanced Network Configuration’ menu.
You should use one of the non-routed IP numbers… eg one of 192.168.x.y. Make x the same for all machines on your local network.
I read in one article about setting the static IP for local, but since I installed a DDNS client on the gateway, isn’t that supposed to set that for me?
In case you did not see the edited comment, I can still ssh into .157, so I guess No-IP is working: it is keeping connection to .157 valid even though the local IP has changed to .191.
Am I understanding that correctly? My router login shows fedora connected at .157.
Thanks,
Sheila
Oh, I get it now, your local machines are connected via your
modem/router… mine are connected via a separate local internet wire.
I cant tell you how to get static ips… it depend on the router
admin setup.
No DDNS has absolutely ZERO relevance to stuff on your local LAN / ethernet / WiFi network.
To get a “fixed IP address” on your local LAN - you need to set it in your router’s DHCP configuration - sometimes called “dedicated lease” or on my TP-Link modem / router it’s “Address Reservation” :
To set it - you need to know the MAC address of the LAN machine you want to give a Reserved IP address… The IP address will be on the same TPC/IP network as EVERYTHING else on your home network.
You seem to be using 192.168.1.0 / 24 (that’s called “CIDR” notation - the /24 means its a Class C subnet with a 255.255.255.0 subnet mask) - so you’d go to your router page and knowing the MAC address of the Fedora machine - give it an IP address somewhere between 192.168.1.2-253 (I’m going assume your router is probably on 192.168.1.1).
You can get the MAC address of the “client” machine (e.g. the one you want to have a FIXED IP ADDRESS) using ifconfig or ip command - e.g. :
╭─x@titan ~
╰─➤ ip a sh dev enp39s0|egrep -v "inet6|valid_lft"
2: enp39s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 2c:f0:5d:74:48:b8 brd ff:ff:ff:ff:ff:ff
inet x.x.x.x/24 brd x.x.x.255 scope global noprefixroute enp39s0
(I’ve redacted my actual ip address and broadcast [brd] to x.x.x.x)
– edit –
In the output above my MAC address is : 2c:f0:5d:74:48:b8 (link/ether)
– end edit –
My “ip” command explained :
“a” is shorthand for “addr” to show address address
“sh” is shorthand for “show”
“dev” is to specify which NIC
and “enp39s0” is my ethernet NIC device name
and then “egrep -v "inet6|valid_lft
” to omit all the unreadable IPV6 rows
Helpful IP PDF info from Red Hat : https://access.redhat.com/sites/default/files/attachments/rh_ip_command_cheatsheet_1214_jcs_print.pdf
Another thing I’d suggest is set you DHCP leases to the longest possible, in my case on my TP-Link router that’s 2880 hours (that’s 120 days).
I’d also restrict/set the possible range to a subset of addresses - in my case I set address 100-199 as the range - that’s 100 possible “leases”.
So if you were to do that - 192.168.1.100 to 192.168.1.199 would be your DHCP lease “scope” - and stuff you set the IP address for manually, will be on either side of that (e.g. 192.16.1.1-99, and 192.16.1.200-254). It would probably make things easier if you used a STATIC IP address configuration on the Fedora machine - i.e. you manually set the IP address on the machine, instead of gettting one from DHCP. But I think Fedora defaults to use NetworkManager (i.e. older Fedora, and Red Hat 8 and earlier use a much simpler /etc/sysconfig/network-scripts/ifcg-$NIC config file - but they’re moving away from that with Red Hat 9) - on my Pop!_OS system using NetworkManager from the Gnome “applet” - it creates files in /etc/NetworkManager/system-connections/ e.g. :
“Wired connection 1.nmconnection” :
╭─x@titan ~
╰─➤ sudo cat /etc/NetworkManager/system-connections/Wired\ connection\ 1.nmconnection
[connection]
id=Wired connection 1
uuid=0ef9daa8-b71f-3a8d-98b3-06f88ae6e4b3
type=ethernet
autoconnect-priority=-999
interface-name=enp39s0
timestamp=1700783394
[ethernet]
[ipv4]
address1=x.x.x.x/24,x.x.x.x
dns=8.8.8.8;8.8.4.4;
ignore-auto-dns=true
ignore-auto-routes=true
method=manual
[ipv6]
addr-gen-mode=stable-privacy
method=auto
[proxy]
in the case above :
address1=x.x.x.x/24,x.x.x.x
that address after the comma “,” is the address of my router (it’s my default gateway).
And I think we’ve gone through this before - you can also use arp and ip commands to “discover” things on your network.
e.g. “arp -a” - and the ip equivalent (see the PDF linked to above) would be “ip ne” (“ne” being shorthand for neigh, itself shorthand for “neighbour”).
I was going to reply but watched golf instead.
Hopefully a simple explanation is that there are public IPs and private IPs.
Find your public IP with https://ifconfig.co.
Find your private IP with the terminal command: ip a
Using a static private IP address for the Fedora server is what I would do.
The DDNS client adjusts a public DNS entry to match your current public IP address. Your cable modem or DSL router or whatever gets its IP address from your ISP using DHCP and it will change every so often. Mine doesn’t change very often, but DDNS is the way to go to keep track so you can expose something to the public if you want.
I use icanhazip.com myself - simple as :
curl icanhazip.com
╭─x@titan ~
╰─➤ curl icanhazip.com
x.x.x.x
Furphied :
╭─x@titan ~
╰─➤ curl icanhazip.com
222.9.249.66
(that’s not my real external IP address)
I too use DDNS (NoIP) so I can get to my home LAN (openvpn and SSH on non-default port 22 to my Raspberry Pi4) without knowing what my dynamic internet service provider “provided” external IP address is. This bears NO relation to the “private” IP addresses used on my home network (other than I set my router to forward or “NAT” external requests to devices on my LAN).
So am I being archaic having a separate local ethernet with one machine having dual ethernet ports and configured as a gateway?
It would seem my modem could do all this for me?
Probably - but I guess your method might be slightly more secure?
I really can’t be arsed managing multiple networks… But I do run a separate “USB Gadget” network so when I plug my Raspberry Pi Zero 2W into the USB of my Linux machine - that’s a different network (that doesn’t run DHCP).
But everything else - the same LAN - ethernet and WiFi - managed by my modem / router… I trust it… The modem even has an OpenVPN server built in… Most of my fixed IP address machines (mostly ARM single board computers) are “servers” and I have their IP addresses outside of the range for my DHCP scope on my router - e.g. my TrueNAS and my RPi3 running TVHeadend, and my OrangePi running Transmission-Daemon… they get addresses between 10 and 99… 100-199 is for my DHCP scope on my router…
You can also curl ifconfig.co or in some cases ifconfig.me looks better.
That’s what I do too. Same ranges. Great minds…
I agree with Dan, it likely could. I’ve thought of using pfsense as a firewall that would be similar to what you have setup. I’d still use a wireless router of some sort to provide WiFi for any wireless devices. Wireless routers from Linksys, TP-Link, Netgear, etc. are optimized for that purpose.
I actually tried this once - way back when my ISP had monthly quotas (ADSL), and if you went over they “shaped” you down to like 1/4 or 1/8 of your regular speed, and my daughter was constantly downloading “content” from p2p networks and I’d have to use my degraded link for work stuff - and it was a right PITA… PFSense offers a method to limit bandwidth on a protocol, and IP address basis…
I’ve also used PFSense as a virtual firewall in a VMware environment to ringfence one “tenant” off from other “tenants”.
But it seemed overkill to have a dedicated machine in my home network - just one more thing to have drawing power and a big ugly box in the kitchen where my modem was… When my router could do it all… Not very well, but it could do it (and modern routers are leaps and bounds ahead of that stuff from the noughties).
If I had a multi-NIC SBC I might reconsider this… As I quite like PFSense (both PFSense and FreeNAS started off as “forks” of m0n0wall) and it runs on FreeBSD… I guess I’d have to go for one of those expensive x86 SBC or a NUC style computer with multiple NICs as PFSense doesn’t run on ARM…
How about a refurbished SBC and add some ethernet cards.
That should only be a few hundred dollars.
I read up on pfsense
it looks attractive.
If I did what you are suggesting, it would avoid having to
run my main computer just to get routing.
I am not sure my Telstra smart modem is configurable for what I need… will have a look.
It has what it calls static leases
and it has dynamic DNS
Short of paying for a static IP number, I dont see any way of setting a fixed IPV4 address for my gateway computer … at least not in the modem. In the computer it is easy, I configure the local NIC static, and leave the WAN NIC on DHCP
.
SBC usually means “single board computer” and just about 90-95% of them are ARM based (i.e. probably won’t be able to run PFSense). I DO NOT want to run an x86 PC for this function - 'cause they EAT power (unlike ARM).
You only need this if you’re going to access it from the world wide intertubes… AKA the public cloud…
Like Sheila - I think you’re confusing DEDICATED EXTERNAL IP ADDRESS with “Static Lease” (which you’ve already found)… in 95% of cases - a FIXED INTERNET IP address isn’t going to help much - and there really isn’t much use for one - unless you were running an internet e-mail server (where you need an MX DNS record). In my use case - DDNS (dynamic) via NoIP solved my issue (e.g. how to access my home network from e.g. my work office, an internet cafe, my phone’s 3G/4G connection etc.
If you’ve got one computer set as a Gateway - and all the others go through it to get to the internet where your router connects you to your ISP - you’re just about there maybe? I assume your gateway machine doesn’t run DHCP - so ALL your computers, physical, or virtual, have hard configured (on the machine itself) static IP addresses - right? What about WiFi?
Good point. and OK SBC means arm not a single motherboard.
Right. My secondary computers only have one NIC and are configured static on the local net. I can use Wifi to connect them directly to the modem, bypassing the gateway computer, which is handy if the gateway is not running.
I also have 2 ethernet printers and a switch on the local net.
I have often wondered how it would work if I connected everything to the switch and still configured the NIC’s static, then connected the switch to the modem. Would the modem attempt to offer dhcp on a network that was already configured static? I think not… it would amount to running 2 networks on the one wire?
I originally just copied what we did at work, 30 years ago.
I think maybe the world has passed me bye… but I have no issues with NFS, its all static.
Okay, under the list of DHCP Connections there is no ‘name’ (like other connections show my pop-os-yoga6, etc.) but using the .157 that I know is Fedora server, I get:
192.168.1.157
E0:2E:0B:90:1E:DD
Dynamic
Network (Home/Office)
Active
1335 (expired in)
There is a button to “add static connection” and I assume this is where I would set that static IP for the local network. However, you said:
But on the page for IPv4 Address Distribution:
Network (Home/Office)
192.168.1.1
255.255.255.0
192.168.1.2 - 192.168.1.254
Does that mean this is the range that I am allowed to use for assigning static IPs? I thought this was the router’s range for assigning them.
Keep in mind this “router” is not the type I have been using for years (i.e., TPLink, etc.). It is a new 5G gateway as I am testing out my cellular company “Verizon” for home internet.
So there is a page I have never seen which might apply to this? Called “Network Objects”
Is this some type of shortcut for doing this? Just wondering if the new router had some preset template for doing this.
I’ll wait for further confirmation of my questions so far, before addressing the other items you outlined.
Thanks,
Sheila
How cool! LOL. I had no idea about this. When I navigate to that in Firefox, I get so much data, including the terminal command: curl ifconfig.co/.
But the given IP address looks nothing like normal IP address formats. Why?
Sheila
I am not sure what you mean, but maybe your ISP gives your router an IPv6 address. Then on the inside you run IPv4. If it’s IPv6 it does look much different.
Here is the output when I do nslookup for yahoo.com.
$nslookup yahoo.com
Server: 10.24.8.75
Address: 10.24.8.75#53
Non-authoritative answer:
Name: yahoo.com
Address: 74.6.231.21
Name: yahoo.com
Address: 98.137.11.163
Name: yahoo.com
Address: 98.137.11.164
Name: yahoo.com
Address: 74.6.143.25
Name: yahoo.com
Address: 74.6.143.26
Name: yahoo.com
Address: 74.6.231.20
Name: yahoo.com
Address: 2001:4998:44:3507::8000
Name: yahoo.com
Address: 2001:4998:44:3507::8001
Name: yahoo.com
Address: 2001:4998:124:1507::f000
Name: yahoo.com
Address: 2001:4998:124:1507::f001
Name: yahoo.com
Address: 2001:4998:24:120d::1:0
Name: yahoo.com
Address: 2001:4998:24:120d::1:1
The first six IPs are IPv4. The next six are IPv6. Is that something like what you see?
You’re right, but here is one that looks dandy as a firewall. Probably overkill with processor and cost. The power draw from the wall would be pretty low. Not ARM low, but low.
MOREFINE S500+ R7-7840HS/R7-7840U/R7-6810U 16GLPDDR5 6400MHz Mini PC
Here is a videoi review of it.
This Tiny PC Crushes 1080P Gaming! The Secret To The Fastest Ryzen 7840HS Mini PC (youtube.com)