View previous topic :: View next topic |
Author |
Message |
spykyvenator n00b
Joined: 31 May 2022 Posts: 23
|
Posted: Sat Jan 13, 2024 7:44 pm Post subject: allow incoming connections without netfirc [SOLVED] |
|
|
Hey,
I recently switched from init system to sinit, and removed netifrc from my openrc use flags to make it lighter.
However, at the moment my pc no longer accepts incomming connections, for example when I try to mount my nfs drive, ssh or host a xonotic lan match no one can connect to the server.
This is because of netifrc, I just reinstalled this and did a reboot and tested ssh.
How can I make this work without netifrc?
I would like to replace openrc with a different service manager and would like to know how to set this up.
/etc/init.d/net.lo is quite lenghty and as far as I can tell my /etc/conf.d/net does the same as my startup script:
Code: | config_enp4s0="192.168.0.248 broadcast 192.168.0.255 netmask 255.255.255.0"
routes_enp4s0="default via 192.168.0.1" |
vs
Code: | ip link set enp4s0 up
ip route add 192.168.0.1 dev enp4s0
ip route add default via 192.168.0.1 dev enp4s0
ip a add 192.168.0.248 dev enp4s0 |
I of course also roamed the web some, but found no answer.
Thanks in advance.
Last edited by spykyvenator on Sat Jan 13, 2024 8:59 pm; edited 1 time in total |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1472 Location: Richmond Hill, Canada
|
Posted: Sat Jan 13, 2024 8:03 pm Post subject: |
|
|
I am not familiar to sinit and from online reading it is not clear how it call service script. So can you give some idea how your network script got called?
Since sinit just a simple init program with minimal features I see no conflict with netifrc, why not setup sinit call netiffc to start network interface? I know you wish to not use netifrc, this question is just help me to understand where the difference in your approach. since I see no information on service dependency so I wonder if it possible that interface was brought up later than network services. So therefor nothing can listen for request. |
|
Back to top |
|
|
krumpf Apprentice
Joined: 15 Jul 2018 Posts: 191
|
|
Back to top |
|
|
spykyvenator n00b
Joined: 31 May 2022 Posts: 23
|
Posted: Sat Jan 13, 2024 8:24 pm Post subject: |
|
|
So sinit runs a simple bash script in /bin/rc.init that performs all of openrc's duties (like starting dhcpd, mounting filesystems etc)
I didn't think about simply calling netifrc , thanks for pointing that out. Instead at the moment I have
Code: | RUNLEVEL=S /sbin/openrc sysinit
RUNLEVEL=S /sbin/openrc boot |
which then starts netifrc.
I will try that, but I am still curious if this can be done with something like iproute (the ip command). |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1472 Location: Richmond Hill, Canada
|
Posted: Sat Jan 13, 2024 8:43 pm Post subject: |
|
|
spykyvenator wrote: | So sinit runs a simple bash script in /bin/rc.init that performs all of openrc's duties (like starting dhcpd, mounting filesystems etc)
I didn't think about simply calling netifrc , thanks for pointing that out. Instead at the moment I have
Code: | RUNLEVEL=S /sbin/openrc sysinit
RUNLEVEL=S /sbin/openrc boot |
which then starts netifrc.
I will try that, but I am still curious if this can be done with something like iproute (the ip command). |
I think if you have log the execution sequence than it will be easier to find out what happen when your iproute commands.
netifrc just fancy way calling iproute. so if you want to simple approach I think it is doable, but you miss all the accumulated experience in netifrc. so if there is some condition that require special handle of network interface start up you will need to handle you self in your script. for example may be there some sort of timing issue for kernel to see the device or may be you need to load modules first. |
|
Back to top |
|
|
spykyvenator n00b
Joined: 31 May 2022 Posts: 23
|
Posted: Sat Jan 13, 2024 8:49 pm Post subject: |
|
|
For people reading this, I just found out with Code: | rc-service "[service]" start -d | you get the log of all commands ran to start the service.
this can be redirected by appending to the command for analyzing.
I will look into that later, thank you for the help pingtoo!
I will add [SOLVED] to the thread subject |
|
Back to top |
|
|
|