You are not logged in.

#1 2019-07-28 16:24:28

hitman47
Member
Registered: 2019-07-28
Posts: 2

[solved] Can't set up static private IP using netctl

Hey, so I've been trying to set up a static private ip for my machine so that it doesn't get a new ip everytime I restart my router but nothing I did seem to work.
I tried to create a file "wlp2s0" in my /etc/netctl/ folder which contains:

Description='A basic static ethernet connection'
Interface=enp1s0
Connection=ethernet
IP=static
Address=('192.168.0.100/24')
Gateway=('192.168.0.1')
DNS=('192.168.0.1' '8.8.8.8' '8.8.4.4')

the template is taken from /netctl/examples and I inputted my correct address, default gateway and Interface name.
I did

 sudo netctl enable enp1s0

and yet the ip still changes when I restart the router so I can't establish a successful port forwarding.

Last edited by hitman47 (2019-07-29 13:00:28)

Offline

#2 2019-07-28 17:13:51

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [solved] Can't set up static private IP using netctl

Have you disabled whatever was previously managing your networking?

systemctl list-unit-files --state=enabled

https://wiki.archlinux.org/index.php/Ne … k_managers


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2019-07-29 13:00:03

hitman47
Member
Registered: 2019-07-28
Posts: 2

Re: [solved] Can't set up static private IP using netctl

problem was solved by disabling dhcp@wlp2s0 service and dhcp service which didn't show up when I typed the command

 systemctl list-unit-files --state=enabled
 

Offline

Board footer

Powered by FluxBB