You are not logged in.
Hello, I was wondering how to prevent this dhcpcd from starting at boot:
sudo lsof -i :68 -S
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dhcpcd 826 root 9u IPv4 14020 0t0 UDP *:bootpc
I'd like to close this port with a nice solution, for 2 reasons. First I don't really need dhcpcd, and second, I don't need to have an extra service running.
I tried to disable dhcpcd using systemctl but it seems that the service is loaded up by network.target (don't know where that bootpc comes from).
I'd like to know a functional workaround to solve the problem, without adding a killall dhcpcd in rc.local.
Hope you guys can help me with this.
Thanks for the suggestions.
Offline
rc.local? I think you're a bit out of date.
Arch won't start dhcpcd by default. Do you have some type of network management program running?
Offline
Check:
systemctl list-dependencies --reverse dhcpcd.service
https://ugjka.net
"It is easier to fool people, than to convince them that they've been fooled" ~ Dr. Andrea Love
Offline
rc.local? I think you're a bit out of date.
Arch won't start dhcpcd by default. Do you have some type of network management program running?
This made me laugh As a matter of fact, coming from slackware I still use it
Check:
systemctl list-dependencies --reverse dhcpcd.service
Seems to be getting this..
sudo systemctl list-dependencies --reverse dhcpcd.service
dhcpcd.service
sudo systemctl status dhcpcd.service
dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service; disabled; vendor pres
Active: inactive (dead)
Offline
it seems that I have solved it by renaming these files as such:
ls network*
network-online.target.old network-pre.target.old network.target.old
How bad is this solution?
Last edited by johnpuppa (2016-02-25 21:34:10)
Offline
As solutions go, I'd compare it to unplugging the 'check engine' light.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
As solutions go, I'd compare it to unplugging the 'check engine' light.
I don't quite follow you.. what do you mean?
Offline
I mean it's a work-around rather than a solution, and since you didn't indicate the location of the files I can only assume they're in /usr/lib/systemd/system/ making it a very bad work-around:
1) You shouldn't be messing with stuff in /usr/
2) The files are part of the systemd package and would be re-created the next time the package is updated.
Rename those files to their original names and reboot. Unless you've made other changes, the dhcpcd process should be back. Then do a bit of research on systemd and how to determine enabled & running services...
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Furthermore, since you mentioned rc.local, I fear there are lots of moving parts here, and it's equally likely that some non-systemd causes this. Try to see where that process comes from:
pstree -cl
But also: how do you set up your network?
Do you have some type of network management program running?
Offline
Actualy, I think the fact that renaming those targets resulted in the dhcpcd process not appearing points clearly to something systemd related.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Actualy, I think the fact that renaming those targets resulted in the dhcpcd process not appearing points clearly to something systemd related.
This assumption is correct, I renamed the filesnames as they were.
Printing the tree did not quite help as the answer I get is this:
systemd-+-Thunar
|-crond
|-dbus-daemon
|-dhcpcd
So it is definetely a systemd problem.
sudo systemctl list-unit-files
dhclient@.service disabled
dhcpcd.service disabled
dhcpcd@.service disabled
sudo systemctl list-unit-files |grep network
org.freedesktop.network1.busname static
dbus-org.freedesktop.network1.service disabled
systemd-networkd-wait-online.service disabled
systemd-networkd.service disabled
systemd-networkd.socket disabled
network-online.target static
network-pre.target static
network.target static
digging further, I discovered that the problem is due to wicd. Which uses dhcpcd or dhclient to get the IP. What I don't understand is why I still get this port 68, which I did not have on slackware.
I tried to modify the wicd preferences but it seems that I'm either forced to use dhclient or dhcpcd or leave it automatic.
Using dhcpcd or dhclient is fine but (both would listen on port 68) though.
Also I noticed that on /usr/lib/systemd/system/dhcpcd.service it says that it WantedBy=multi-user.target
I'm wondering if there is any solution to avoid having dhcpcd or dhclient listening on a port or to have the dhcpcd.service not starting at boot.
or what possible solution I could get to without avoiding wicd.
If I kill dhcpcd wicd keeps working fine..
Thanks.
Offline
Try masking the dhcpcd and dhclient services.
https://wiki.archlinux.org/index.php/Sy … sing_units
Moving to the Networking forum.
Offline
Of course, if you're actually using dhcp, that will likely cause problems.
IMO, the real problem here is with the slackware setup you keep referencing. A dhcp client is SUPPOSED to listen on port 68.
Last edited by Scimmia (2016-02-27 07:29:24)
Offline
Try masking the dhcpcd and dhclient services.
https://wiki.archlinux.org/index.php/Sy … sing_units
Moving to the Networking forum.
Thanks for the suggestion, seemed a good one.
I tried it but unfortunately it leads to no luck...
I'll just stick the killall dhcpcd in rc.local for now.. seems the only decent one..
Offline
I'll just stick the killall dhcpcd in rc.local for now.. seems the only decent one..
It's not.
Back to basics here. Are you using dhcp to set up your connection or not?
Offline
johnpuppa wrote:I'll just stick the killall dhcpcd in rc.local for now.. seems the only decent one..
It's not.
Back to basics here. Are you using dhcp to set up your connection or not?
"for now"... should I leave it as it is then? or have u got a better solution?
Offline
I'm sure I do, but unless you start answering questions, we're not going to get anywhere.
Offline
I'm sure I do, but unless you start answering questions, we're not going to get anywhere.
I did not noticed that post.. sorry for that. As a matter of facts I don't really use it..
Offline
What does "don't really use it" mean? Are you manually assigning a static IP, gateway, and DNS server or not?
Last edited by Scimmia (2016-02-28 18:00:37)
Offline
What does "don't really use it" mean? Are you manually assigning a static IP, gateway, and DNS server or not?
On this specific machine, everything is static, yes.
Offline
If everything is static then why do you need wicd? Stop/disable wicd, statically configure the wireless and problem solved?
Offline
Post up your wicd config files from /etc/wicd/*.conf, redacting keys as necessary.
Offline
Post up your wicd config files from /etc/wicd/*.conf, redacting keys as necessary.
Here they are..
/etc/wicd $ ls *.conf
manager-settings.conf wired-settings.conf wireless-settings.conf
wireless-settings.conf
[A0:21:B7:CB:2C:EF]
afterscript = None
dhcphostname = arch
bssid = A0:21:B7:CB:2C:EF
ip = 192.168.0.13
dns_domain = None
gateway = 192.168.0.1
use_global_dns = False
encryption = True
postdisconnectscript = None
beforescript = None
hidden = False
channel = 1
mode = Master
psk = bbbf31667a3dc35c7a7b8a3d67a4c0bb87795743cf1f89d7421127e10c954e25
netmask = 255.255.255.0
key = "password"
usedhcphostname = 0
predisconnectscript = None
bitrate = auto
enctype = wpa
allow_lower_bitrates = 0
dns3 = None
dns2 = 8.8.4.4
dns1 = 8.8.8.8
use_settings_globally = False
use_static_dns = True
apsk = "password"
encryption_method = WPA2
essid = virginmedia8888
automatic = 1
search_domain = None
manager-settings.conf
[Settings]
backend = external
wireless_interface = wlo1
wired_interface = enp3s0
wpa_driver = wext
always_show_wired_interface = False
use_global_dns = False
global_dns_1 = None
global_dns_2 = None
global_dns_3 = None
global_dns_dom = None
global_search_dom = None
auto_reconnect = True
debug_mode = False
wired_connect_mode = 1
signal_display_type = 0
should_verify_ap = 1
dhcp_client = 0
link_detect_tool = 0
flush_tool = 0
sudo_app = 0
prefer_wired = False
show_never_connect = True
wired-settings.conf
[wired-default]
ip = None
broadcast = None
netmask = None
gateway = None
search_domain = None
dns_domain = None
dns1 = None
dns2 = None
dns3 = None
beforescript = None
afterscript = None
predisconnectscript = None
postdisconnectscript = None
encryption_enabled = None
default = True
dhcphostname = arch
Last edited by johnpuppa (2016-03-01 10:11:57)
Offline
@johnpuppa, edit your post and use code tags instead of quote tags for posting the configs.
Offline
@johnpuppa, edit your post and use code tags instead of quote tags for posting the configs.
done :-)
Offline