You are not logged in.

#1 2016-02-25 19:56:55

johnpuppa
Member
Registered: 2013-05-11
Posts: 27

port 68 at boot (dhcpcd)

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

#2 2016-02-25 20:00:38

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: port 68 at boot (dhcpcd)

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

#3 2016-02-25 20:09:43

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,806
Website

Re: port 68 at boot (dhcpcd)

Check:

systemctl list-dependencies --reverse dhcpcd.service

https://ugjka.net
paru > yay | webcord > discord
pacman -S spotify-launcher
mount /dev/disk/by-...

Offline

#4 2016-02-25 21:16:30

johnpuppa
Member
Registered: 2013-05-11
Posts: 27

Re: port 68 at boot (dhcpcd)

Scimmia wrote:

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 smile As a matter of fact, coming from slackware I still use it big_smile

ugjka wrote:

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

#5 2016-02-25 21:33:38

johnpuppa
Member
Registered: 2013-05-11
Posts: 27

Re: port 68 at boot (dhcpcd)

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

#6 2016-02-25 21:45:10

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: port 68 at boot (dhcpcd)

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

#7 2016-02-26 00:57:18

johnpuppa
Member
Registered: 2013-05-11
Posts: 27

Re: port 68 at boot (dhcpcd)

alphaniner wrote:

As solutions go, I'd compare it to unplugging the 'check engine' light.

I don't quite follow you.. smile what do you mean?

Offline

#8 2016-02-26 02:31:47

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: port 68 at boot (dhcpcd)

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

#9 2016-02-26 08:07:16

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: port 68 at boot (dhcpcd)

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?

Scimmia wrote:

Do you have some type of network management program running?


pkgshackscfgblag

Offline

#10 2016-02-26 14:06:22

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: port 68 at boot (dhcpcd)

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

#11 2016-02-26 16:15:22

johnpuppa
Member
Registered: 2013-05-11
Posts: 27

Re: port 68 at boot (dhcpcd)

alphaniner wrote:

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

#12 2016-02-27 05:26:12

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: port 68 at boot (dhcpcd)

Try masking the dhcpcd and dhclient services.

https://wiki.archlinux.org/index.php/Sy … sing_units

Moving to the Networking forum.

Offline

#13 2016-02-27 06:24:05

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: port 68 at boot (dhcpcd)

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

#14 2016-02-28 17:34:19

johnpuppa
Member
Registered: 2013-05-11
Posts: 27

Re: port 68 at boot (dhcpcd)

x33a wrote:

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... sad

I'll just stick the killall dhcpcd in rc.local for now.. seems the only decent one..

Offline

#15 2016-02-28 17:38:57

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: port 68 at boot (dhcpcd)

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?

Offline

#16 2016-02-28 17:41:38

johnpuppa
Member
Registered: 2013-05-11
Posts: 27

Re: port 68 at boot (dhcpcd)

Scimmia wrote:
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"... smile should I leave it as it is then? or have u got a better solution?

Offline

#17 2016-02-28 17:44:14

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: port 68 at boot (dhcpcd)

I'm sure I do, but unless you start answering questions, we're not going to get anywhere.

Offline

#18 2016-02-28 17:51:39

johnpuppa
Member
Registered: 2013-05-11
Posts: 27

Re: port 68 at boot (dhcpcd)

Scimmia wrote:

I'm sure I do, but unless you start answering questions, we're not going to get anywhere.

I did not noticed that post.. smile sorry for that. As a matter of facts I don't really use it..

Offline

#19 2016-02-28 17:59:50

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: port 68 at boot (dhcpcd)

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

#20 2016-02-28 18:11:27

johnpuppa
Member
Registered: 2013-05-11
Posts: 27

Re: port 68 at boot (dhcpcd)

Scimmia wrote:

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

#21 2016-02-28 18:48:57

branch
Member
Registered: 2014-03-16
Posts: 209

Re: port 68 at boot (dhcpcd)

If everything is static then why do you need wicd? Stop/disable wicd, statically configure the wireless and problem solved?

Offline

#22 2016-02-29 02:35:21

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: port 68 at boot (dhcpcd)

Post up your wicd config files from /etc/wicd/*.conf, redacting keys as necessary.

Offline

#23 2016-02-29 20:17:43

johnpuppa
Member
Registered: 2013-05-11
Posts: 27

Re: port 68 at boot (dhcpcd)

Scimmia wrote:

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

#24 2016-03-01 04:56:41

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: port 68 at boot (dhcpcd)

@johnpuppa, edit your post and use code tags instead of quote tags for posting the configs.

Offline

#25 2016-03-01 10:15:34

johnpuppa
Member
Registered: 2013-05-11
Posts: 27

Re: port 68 at boot (dhcpcd)

x33a wrote:

@johnpuppa, edit your post and use code tags instead of quote tags for posting the configs.

done :-)

Offline

Board footer

Powered by FluxBB