Permanently add second loopback ( to opensuse

I need to have a second loopback interface in my OpenSUSE 12.1 server ,
I can create it with a simple ifconfig command:

ifconfig lo:1

But, what is the recommended way to make it permanent? (After a reboot) Can’t find a way to to that with Yast.


Perhaps create an init script for it? Drop the command in
/etc/init.d/after.local and it should run there.

Out of curiosity, why do you feel like you need this?

Good luck.

Are you sure you really need another <interface> or just a new working address?
Although maybe possible, I have yet to run into a situation that required a new interface, and it likely hardly makes much sense unless you really need to isolate your two loopback addresses.

If you don’t need another interface but need the additional address, AFAIK you only need to add to your Hosts file, by default the loopback interface should support the entire address space by default.


Actually lo interface will answer to request on any address from network. Just try to connect to, etc. So I guess it would help if you explained what you intend to do.

Thanks for your reply. I need to run multiple instances of JBoss and I bind each one to a different loopback interface so they are not accessible from outside without having to tweak firewall settings.

I didn’t know that (!!!). I’ll try to run my different JBoss’s binding to without ifconfig’ing it to see if it just works. Thanks.