Permanent second IP for green interface

Post Reply
IT_teacher
Posts: 31
Joined: December 28th, 2010, 4:28 pm

Permanent second IP for green interface

Post by IT_teacher » October 31st, 2017, 9:04 am

Hi!
What command(s) and in what config file(s) must be inserted for making same result as of command from terminal ifconfig green0:0 192.168.3.254 permanent?

fredym
Posts: 320
Joined: November 14th, 2016, 2:45 pm

Re: Permanent second IP for green interface

Post by fredym » October 31st, 2017, 2:03 pm

Hello,
you could add a entry to local.rc

Fred

IT_teacher
Posts: 31
Joined: December 28th, 2010, 4:28 pm

Re: Permanent second IP for green interface

Post by IT_teacher » October 31st, 2017, 3:22 pm

Syntax of that entry, please!

fredym
Posts: 320
Joined: November 14th, 2016, 2:45 pm

Re: Permanent second IP for green interface

Post by fredym » October 31st, 2017, 4:23 pm

Hello,
puhhh .. see for if (ifconfig) command :) -> man-pages !
I do such things one or two times a year only ... man pages will help.

Fred

User avatar
Arne.F
Core Developer
Core Developer
Posts: 7658
Joined: May 7th, 2006, 8:57 am
Location: BS <-> NDH
Contact:

Re: Permanent second IP for green interface

Post by Arne.F » December 6th, 2017, 4:35 pm

rc.local has the same syntax like on the commandline but it is not the correct place because it will only executed once at boot and additional IP's will removed on reconnect.

Better is to add the line to /etc/sysconfig/firewall.local in the start section and the opposite command that remove the ip in the stop section.
Arne

Support the project on the IPFire whishlist!

Image

Image

Image
PS: I will not answer support questions via email and ignore IPFire related messages on my non IPFire.org mail addresses.

IT_teacher
Posts: 31
Joined: December 28th, 2010, 4:28 pm

Re: Permanent second IP for green interface

Post by IT_teacher » December 6th, 2017, 5:10 pm

Thanks for reply, but question - what is opposite command for ifconfig green0:0 192.168.3.254 in case when /etc/sysconfig/firewall.local supports such syntax? When not - what is proper syntax for that command.

User avatar
Arne.F
Core Developer
Core Developer
Posts: 7658
Joined: May 7th, 2006, 8:57 am
Location: BS <-> NDH
Contact:

Re: Permanent second IP for green interface

Post by Arne.F » December 7th, 2017, 1:30 am

Sorry, i dont know the syntax of the obsolete ifconfig.
I use 'ip' to manage interfaces and addresses.
But there must be a option to revert the function.

ip addr add IP/CIDR dev INTERFACE
and
ip addr del IP/CIDR dev INTERFACE
Arne

Support the project on the IPFire whishlist!

Image

Image

Image
PS: I will not answer support questions via email and ignore IPFire related messages on my non IPFire.org mail addresses.

IT_teacher
Posts: 31
Joined: December 28th, 2010, 4:28 pm

Re: Permanent second IP for green interface

Post by IT_teacher » December 8th, 2017, 1:41 pm

Thanks, Arne, your solution is exactly what I needed and working!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests