Set LAN IP after install


(dreamerman) #1

Hi, I managed to install v7.4 on a dedicated machine and has internet access through NIC1 ( After rebooting and entering root password, I can only see a command prompt. How do I enter details for NIC2? I plan to set as ip for NIC2.

(Jeroen Visser) #2 :wink:

Edit: do consult the documentation as well. It’s to the point and as little as an average admin needs to get things working on Nethserver. It’s a time saver.

(dreamerman) #3

Hi Jeron, thanks but not sure what you mean. With ip addr command I can see only my WAN-side NIC1 is up ( My LAN-side NIC2 is the one I need to put as but do not know how to achieve that using command.

(Jeroen Visser) #4

You should use a browser and point it to the https link I posted, that will give you the server manager webpage.

Still on a phone, will post more detailed when at a computer.

(Markus Neuberger) #5

It should just work as @planet_jeroen described with browsing to https://external_ip_address:980 but if you want to edit interfaces:

Assuming eth0 is your internal/green interface:

db networks set eth0 ethernet role green ipaddr netmask network onboot yes bootproto static

(dreamerman) #6

Thanks guys, I typed in exactly as suggested but no joy. I was playing with clearos at the same time and their first startup after installation is the network config gui. I can easily insert my network interface and I can immediately access the clearos machine via my laptop.

(Markus Neuberger) #7

I forgot to mention

Choose an IP to assign to an interface, for example

ifconfig eth0

Then reconfigure the system:

signal-event system-init

Found another thread:

(Marc) #8

If I recall correctly, when installing NethServer if you don’t specify IP settings it will configure interfaces with DHCP. If the setup is using CentOS installer (Anaconda) it allows to configure network interfaces.
Then you should be able to access the server-manager web page pointing browser to https://server-ip:980.

If for some reason you can not access the server-manager, and you want to set the GREEN interface from command line, you can specify it providing the correct network interface name and network parameters:

[root@localhost ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    inet brd scope global dynamic enp0s3
3: enp0s8: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
[root@localhost ~]# db networks set enp0s8 ethernet role green ipaddr netmask network onboot yes bootproto static
[root@localhost ~]# signal-event interface-update

Point client’s browser to https://server_ip:980

(dreamerman) #9

Thanks guys I just can’t get it to work despite following all steps given. I can see the interface set up as but can’t connect from my laptop using The only thing working for me at the moment on my test machine is clearos. I already have pfsense on a dedicated machine protecting my home. I just find pfsense hard to use and wanted to change to nethserver.

(Markus Neuberger) #10

Please give it another try, NS can be a simple UI gateway and will fit your needs I think.

If you get no address by DHCP a fallback IP is assigned:

So you may try to connect with your laptop to one interface after the other and one of them should have

There are other installation modes:

  • manual installation: you can setup network on install
  • unattended install: DHCP or fallback


What’s the output if you run these two commands?

ip addr
db networks show

(Jeroen Visser) #11

Here is a simple screenshot documentation to get Nethserver installed AND access the servermanager:

After booting you will be greeted with this screen:

You opt for the first choice, the interactive installation. This will bring you to the next screen:

Work through these items in the order of the red dots with numbers. 1 will open this screen, select a region and click Done.

Next was the keyboard layout. I always accept defaults, they suit me:

Lastly, the network settings will need to be set:

We need to change the IPv4 settings, so we click on that tab:

We then change the method to manual:

…and enter the desired IP configuration and hit save:

You probably also want to change your hostname:

Finaly, confirm your settings and press done:

And we can now start the install:

Click ‘Set root password’ and enter a password, click done when ready:

and wait till ready.


When it shows a logon prompt, goto the IPv4 address you entered on https and add port 980. Our example would be: (as per your examples, dunno if I got the default gateway right) Confirm the security exception and you should end up with this:

Yes, the IP here differs, I had to change the IP to my local settings :wink:

Now logon with the root account and the password you just set and work through the final setup steps, and continue to configure your server:

(next next, nethad.pljnet.local, next next next)

…profit :wink:

Yum install kills networking
(Dan) #12

It would be really helpful if the login prompt said that directly: “To configure this server, browse to https://whatever:980 with your web browser.” Many other software distributions that are designed with a web GUI as their primary means of administration do this.

Edit: See, e.g., FreePBX:

or RancherOS:

Show Nethserver web interface URLs on login via issue
(Jeroen Visser) #13

I’m always a bit conservative when it comes to running servers that are not ‘just’ a media center or something like that. One should not be pampered to setup a server without knowing what it is they are doing … it’s kinda dangerous …

(dreamerman) #14

Wow, I am overwhelmed from the support from this forum. Never imagined I would get so many good people wanting to help. I am certainly not giving up :grin:
Is my setting LAN-interface below correct?
Netmask: 24
DNS server:

(Markus Neuberger) #15

Can you reach the webinterface?

The IP address is ok.
As regards the netmask: 24 is cidr notation, I’d use just to be sure it’s accepted.
On your internal(green, LAN) network inteface you won’t need gateway and dns server but they should be set on external (red, WAN) interface.
Your clients would need gateway and dns server in their config but step by step.

For reaching the webinterface ip address and netmask on one of your interfaces should be enough to work.

(dreamerman) #16

Hi, I followed your instructions. It is running installation now and will feedback once done. Cheers.

(Markus Neuberger) #17

OK, this way you should be able to browse to after installation. Good luck!

(dreamerman) #18

:cry: Nothing I do works. I thought it could be my laptop not connecting to webinterface but same result after I connect the LAN cable to another laptop.
A few days ago I installed clearos v7.4 and everything worked out of the box with minimal input. I can access webinterface via a laptop and able to access internet.

Ok here is my setup at home. Blue means a working system and yellow is my test Nethserver system.

(Markus Neuberger) #19

You may give your laptop a static ip:


Then try to connect to one after the other of your 3 network interfaces with lan cable, direct, from laptop to nethserver. One of these 3 connections has to work.

(Markus Neuberger) #20

What about adding your howto to the wiki? The installation howtos there cover Nethserver 6.7 with text install so it’s time for an upgrade…