Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Hi question about /etc/conf.d/net, changes aren't applying
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
colin75
n00b
n00b


Joined: 05 Oct 2016
Posts: 2
Location: Kirkintilloch

PostPosted: Wed Oct 05, 2016 4:20 pm    Post subject: Hi question about /etc/conf.d/net, changes aren't applying Reply with quote

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, :roll: 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
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Wed Oct 05, 2016 6:23 pm    Post subject: Reply with quote

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

Code:
# 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/
Code:
# 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 .
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Thu Oct 06, 2016 3:12 am    Post subject: Reply with quote

@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
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
colin75
n00b
n00b


Joined: 05 Oct 2016
Posts: 2
Location: Kirkintilloch

PostPosted: Thu Oct 06, 2016 1:47 pm    Post subject: Output Reply with quote

@eccerr0r:

Hi, thanks for your assistance and reply.

The output from :
Code:
# 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
# in /etc/conf.d/net (this file :]!).
#dns_domain_lo="Intuware-s.com"
config_eth0=( "192.168.1.5 netmask 255.255.255.0 brd 192.168.1.255" )
routes_eth0=( "default via 192.168.1.254" )


Your right in that perhaps I'm completely overlooking something real simple, wouldn't be a first for sure :oops: :)
.. 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
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Thu Oct 06, 2016 2:02 pm    Post subject: Reply with quote

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.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum