I'm behind a router with at least 1 client and at most 3 clients. My "main" client runs some services like Apache2 so I port forwarded in router configuration the incoming traffic to its IP address 10.0.0.2 assigned by the router's dhcp. Sometimes it happens that the routers assigns 10.0.0.3 to my main client so i have to change all the forwarding. Are there any possibilities to avoid this?
I thought about something like
ifconfig eth1 down
ifconfig eth1 10.0.0.2 up
but this doesn't help. I still have 10.0.0.3.
This doesn't work either.
dhclient -r
ifconfig eth1 down
ifconfig eth1 10.0.0.2 up
I have still 10.0.0.3 after reconnecting.
Maybe there are another solutions? By the way, this must not be a perfect solution because it's just a home network, but the target is to not change all the forwardings all the time.