You are not logged in.
I have NFS shares from my virtual server, /etc/exports looks like:
# /etc/exports - exports(5) - directories exported to NFS clients
#
# Example for NFSv2 and NFSv3:
# /srv/home hostname1(rw,sync) hostname2(ro,sync)
# Example for NFSv4:
# /srv/nfs4 hostname1(rw,sync,fsid=0)
# /srv/nfs4/home hostname1(rw,sync,nohide)
# Using Kerberos and integrity checking:
# /srv/nfs4 *(rw,sync,sec=krb5i,fsid=0)
# /srv/nfs4/home *(rw,sync,sec=krb5i,nohide)
#
# Use `exportfs -arv` to reload.
/srv/nfs4/ 85.235.xxx.xxx(rw,no_root_squash,no_subtree_check,fsid=root,crossmnt)
/srv/nfs4/pcom 85.235.xxx.xxx(rw)
/srv/nfs4/util 85.235.xxx.xxx(rw)
<similar lines 6 times>
The only allowed client IP is hardcoded in the configuration file: 85.235.xxx.xxx.
Unfortunately my client IP address changes from time to time due to the ISP. In fact not so often, maybe only 2 - 4 times per year.
So I would like to know if some mechanism does exist, which makes it easier to update, or automatically keep updated the /etc/exports configuration file. For example using some kind of variable to substitute the IP address at the right places.
Or should I write a program for this reason which updates this file in case of need?
Offline
dyndns service?
How would the server be supposed to "know" the proper new IP?
For example using some kind of variable to substitute the IP address at the right places.
You can use a (degenerated) netgroup, https://linux.die.net/man/5/netgroup
Offline
You can set up a VPN.
Offline