# Hi question about /etc/conf.d/net, changes aren't applying

## colin75

I run a Gentoo webserver that I set up some time ago, there was a firewall between it and the gateway router, that firewall is now gone, so I've just plugged it into the gateway router.

It resided on a separate subnet, so I have made the changes from 192.168.2.* to 192.168.1.*, and now that is on the same subnet as the gateway router networking is fine.

I used ifconfig and route to update the new ip address and gateway address.

I also edited the /etc/conf.d/net file with the new ip addresses

I used ln -s net.lo net.eth0 (from within /etc/conf.d) to create the new symlink and deleted the old one, removed the old default runlevel and entered the new one with rc-update, as per all the instructions I've found online and in the handbook.  ..and it works...

However, the changes don't persist through a reboot, or even a restarting of /etc/init.d/net.eth0,   :Rolling Eyes:  it keeps loading the old ip address and route.

What's going on anyone?  Is there something else I'm missing, or some other config file for the ip addresses.

Hope someone can help, many thanks

Colin

----------

## eccerr0r

I'd make sure your config is set up properly - just to make sure your syntax is right and there's no funny stuff going on, what's the output of

```
# grep -v '^\s*#' /etc/conf.d/net|sed '/^$/d'

```

?

But indeed you're right, should be able to use service net.eth0 restart (or /etc/init.d/net.eth0 restart) to check your work, no need to reboot.  Did you create any custom startup files in /etc/local.d/ 

```
# ls /etc/local.d/
```

that possibly could override anything net.eth0 using /etc/conf.d/net tried to set up?  (I shot myself in the foot once forgetting that I had done some crap there...)

BTW, the config file should be /etc/conf.d/net, and it should contain all the interfaces.  The /etc/init.d/ directory contains net.lo and the other net.eth0, net.enp0s0, net.wlp3s4, etc. links to net.lo .

----------

## pjp

@colin75:

Hello, and welcome. As a precaution against spam, I've removed the URL from your profile. We normally ban users that appear to be spammers, but this thread also seems legitimate. Let me know if you have any questions or concerns.

--pjp

----------

## colin75

@eccerr0r:

Hi, thanks for your assistance and reply.

The output from : 

```
# grep -v '^\s*#' /etc/conf.d/net|sed '/^$/d' 

```

is:  *Quote:*   

> # This blank configuration will automatically use DHCP for any net.*
> 
> # scripts in /etc/init.d.  To create a more complete configuration,
> 
> # please review /etc/conf.d/net.example and save your configuration
> ...

 

Your right in that perhaps I'm completely overlooking something real simple, wouldn't be a first for sure   :Embarassed:   :Smile: 

.. and I also wouldn't put it past myself to have done some customisation, but my /etc does not contain a local.d, maybe since the webserver was setup, Gentoo has moved on and some config files have changed?  It was a few years ago it was setup if my memory serves.

Kind regards

Colin

----------

## eccerr0r

Yeah, I noted you have a very old setup or at least a "legacy" setup because you're still using eth0, and the newer udev are using persistent device names (enp5s2-looking names) which shouldn't change if you add Ethernet cards.  I've forgotten what the old Gentoo used for custom configuration since I've long since upgraded to baselayout2 which should have repopulated your custom config to /etc/local.d/baselayout1.start and /etc/local.d/baselayout1.stop.  I had a very old install that did just this when I upgraded to baselayout2.

Thus it sounds like your system is kind of out of date.  It's been a while since baselayout1, so I no longer remember all the file locations in baselayout1 anymore.  I'd really suggest updating but I would suspect things would be huge borkage if you tried.  Perhaps someone broke in and hardcoded all your stuff and it's no wonder why things aren't working, might be worth reinstall.

----------

