olddirt's picture

The package loaded fine and worked well..  However, when the package loaded, there was no place to set a static IP address. The program used the next availible IP address from my DNS server.  How do you change the dynamic IP address to a static IP address.?

Forum: 
Alon Swartz's picture

We are currently working on a configuration console to be included in the next release which will let you configure the network without having to log in and mess around with the command line.

In the meantime, you can log in with the default root password and configure you IP the old fashioned way:
joomla login: root
password: turnkey

ifconfig eth0 192.168.0.10 netmask 255.255.255.0 up

This sets the IP until reboot. If you want the IP configuration to be persistent, edit /etc/network/interfaces like this:
editor /etc/network/interfaces

    auto eth0
    iface eth0 inet static
        address 192.168.0.10
        netmask 255.255.255.0
For further details...
man interfaces

And here's everything you ever wanted to know about network configuration on Debian/Ubuntu but were afraid to ask:

http://www.debian.org/doc/manuals/reference/ch-gateway.en.html

Lars Schouw's picture

 I tried this but can't ping my turnkey OS from my host OS (Windows 7).

I can ping localhost and 192.168.0.6 inside of Linux.

I updated VMWare tools but it did not help.

DHCP fails as well.

Lars

Jeremy Davis's picture

Hi Lars, this is a really old post and all TKL appliances now have the confconsole (that Alon was talking about in is post above). So whilst all his info is still relevant and should still work, it is somewhat redundant (unless you want to learn how to do it the 'old school' way).

If you could update VM tools then you obviously have network conection. Or at least you did before you followed the steps above. My guess from your limited info is that 192.168.0.6 is not a good IP for you to use (it was given as an example - not as a strict suggestion).

Possibly the easiest way to fix this is to open the confconsole. If you are using the VM image then you may need to do that manually (I know it auto starts by default when installed from ISO but not sure about VM images). To manually start confconsole, at the command line (in TKL appliance), type:

/usr/bin/confconsole

then select to automatically set IP (using DHCP). This should give you a useable IP. Probably the safest thing to do is to set this automatically asigned IP as static. To do this you can follow the intructions above again (but using this new IP address rather than 192.168.0.6) or better still you can use the confconsole (seeing as you have it open already) , take note of the current (automatic/DHCP) IP displaye in confconsole and then manually set the IP to the same one it was asigned automatically.

Once you have done this, can you ping your appliance using the new IP?

Lars Schouw's picture

 I found the problem. I choose bridge network and needed to turn off automatic under Virtual Network Editor and select the correct NAT manually.

Lars

Jeremy Davis's picture

Sounds like I was barking up the wrong tree. Although the instructions I gave should also allow you to set a static IP while maintaining bridged networking. NAT can be very cool though if you wish to have all your TKL appliances available from the same IP.

Glad to hear you got it sorted.

Jeremy Davis's picture

Each DHCP server will essentially do it differently but the general way they do it is read the MAC address and match that to an IP.
Jeremy Davis's picture

And if you know what your DHCP server is then you can google it yourself, instead of me doing it for you! :)

And if you don't know what your DHCP server is then you probably need to do lots more reading and research or pay someone who can work it out for you...

Jeremy Davis's picture

If you want to find out more about a Linux command try 'help', e.g.
$ help .
.: . filename [arguments]
    Execute commands from a file in the current shell.
    
    Read and execute commands from FILENAME in the current shell.  The
    entries in $PATH are used to find the directory containing FILENAME.
    If any ARGUMENTS are supplied, they become the positional parameters
    when FILENAME is executed.
    
    Exit Status:
    Returns the status of the last command executed in FILENAME; fails if
    FILENAME cannot be read.
So it basically runs ./.bashrc Your bashrc file does things like set global variables...
Jeremy Davis's picture

Each IP segment must be between 0-254 (255 is generally reserved). Having said that, I'm guessing that's a typo and you meant 64.180.168.48. Although if you actually put 604.180.168.48 in then failure would be expected.

From a glance, otherwise that seems ok. Although do you really have a network like that set up? That's far from a usual network config! Usually most private LAN networks use either 10.x.x.x (with a subnet of 255.0.0.0) or 192.168.1.x (or 192.168.0.x - with a subnet of 255.255.255.0).

The only other thing that occurs to me is that perhaps you are using "host only networking" (VM config in VirtualBox)? If that's the case, then the DHCP is provided by VirtualBox and AFAIK does not support static IP so failure would be expected.

Anyway, please provide more info on your network setup and exactly what/how it doesn't work and we'll go from there...

Jeremy Davis's picture

That is all very strange.

By default TurnKey get's it's IP config from the first DHCP server it encounters on the network. VirtualBox does include it's own (isolated) DHCP server, but that is only used with "NAT" and "Host only" VM network config. If you were using "Bridged" networking then it should have been getting the network config from the network DHCP (probably your router) and so it should have been a valid address for your network (in other words copying from DHCP to static should have 'just worked").

Anyway, glad you have it all worked out now. Good luck.

Add new comment