configure ip for bitnami owncloud virtual appliance - owncloud

I installed Bitnami owncloud virtual appliance stack on Virtual box and within no time, I was able to sync files to and from this box. However, the main problem with Virtual Box is that the IP address keeps changing when the owncloud instance is powered off and then turned back on - which makes sense. Is there any way to keep the server IP static so that we don't need to configure the clients everytime the IP is changed.

You could change the config (from auto to static) in the following way
sudo vi /etc/network/interfaces (“vi” or “nano”)
iface eth0 inet static
address 192.168.0.100
# your own IP
netmask 255.255.255.0
# network mask
gateway 192.168.0.1
# standard gateway (router)
dns-nameservers 192.168.0.1 8.8.8.8
# DNS (optional)
/etc/init.d/networking restart (restart network)
ifconfig
for the IP addresses check or you “shutdown –h now” (reboot)). Please, keep in mind that multiple copies need multiple IP's. In Virtual Box remember to switch between NAT and Bridge - if required.

Related

Script to toggle IPV4 IP address, between the "obtain IP address automatically" settings, and a specific IP address and Subnet mask in windows cmd

I am looking for a way to change the IPV4 IP address settings to a specific IP and Subnet mask, but also to change it to get the IP address automatically. I see plenty of resources for setting the IPV4 IP and DNS settings in windows cmd, but I don't see where i can change it to the "Obtain IP address automatically" setting.
Basically, I need to quickly switch my settings from the default IP wifi settings to a specific IP address and subnet mask (well, the default one, but it needs to be set when changing IPV4 settings), and back when I need it.
DHCP is used to obtain IP address automatically. When you'd want to revert the interface to using DHCP again, just run the following commands.
netsh interface ip set address name="<adapter-name>" dhcp
netsh interface ip set dns name="<adapter-name>" dhcp
ipconfig /release <adapter-name> && ipconfig /renew <adapter-name>

Networking not initialized with cloud-init on some Centos 7 images

I'm trying to create KVM VMs of Centos 7 with cloud-init. I am using the images found at https://cloud.centos.org/centos/7/images/ .
In the meta-data file I put the following content:
network-interfaces: |
iface eth0 inet static
address 10.0.0.10
network 10.0.0.0
netmask 255.255.255.0
broadcast 10.0.0.255
gateway 10.0.0.1
bootcmd:
- ifdown eth0
- ifup eth0
However I don't get the same behaviour depending on the image used (I tried a few):
Centos-7, Centos-7-2009: The VM doesn't use the static IP given (the link is down)
Centos-7-1805: The VM uses the static IP but SSH connection initialisation is very slow (a minute or two)
Centos-7-1607: The VM uses the static IP, SSH works correctly, but the Ansible playbook I tried with an ordinary Centos-7 image (installed from an iso file) doesn't work perfectly on this image (issue with some packages missing), I would like to not change my playbook.
Is there a reason there are so much differences between the different images ? Am I doing something wrong ?
Thank you

Raspberry Pi Zero W Honeypot (similar to Wireless AP)

I want to access a server on the Raspberry Pi Zero via WiFi.
YouTube Video describing the Problem
I am following the tutorial on this Blog for the Raspberry Pi .
Accessing the server with another laptop doesn't work. It says that it is not connected.
When I run on the Raspi
sudo cat /var/log/dnsmasq.log
I get at the end this error:
May 9 09:59:28 dnsmasq-dhcp[513]: no address range available for DHCP request via wlan0
But I am not sure if this has to do anything with the problem at all.
How can I make the Raspi Zero W http-Server (the http server is a server on the raspi) connectable over WiFi?
Here are the relevant parts of the files.
File: /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
iface wlan0 inet static
address 10.0.0.1
netmask 255.255.255.0
broadcast 255.0.0.0
pre-up iptables-restore < /etc/iptables.rules
File: /etc/dnsmasq.conf
#...
#at the end of the file
log-facility=/var/log/dnsmasq.log
address=/#/10.0.0.1
interface=wlan0
dhcp-range=10.0.0.10,10.0.0.250,12h
no-resolv
log-queries
File: /etc/dhcp/dhclient.conf
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
File: /etc/dhcpcd.conf
# Inform the DHCP server of our hostname for DDNS.
hostname
# Use the hardware address of the interface for the Client ID.
clientid
# Persist interface configuration when dhcpcd exits.
persistent
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# A ServerID is required by RFC2131.
require dhcp_server_identifier
# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private
# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname
I have read the blog and i successfully implemented the server following all the steps.It is possible that you have misconfigured something. My bets are on the /etc/network/interfaces file or on the /etc/dnsmasq.conf.
Also, check if you don't have another dhcp server on. Maybe the internal /etc/dhcp/dhcpd.conf is overwritting your ip pool.
Post the relevant part of all those files to see if there is any error.
Simple solution, plug in a HDMI monitor and keyboard and use the desktop network GUI to set up the Wifi (click on the WiFi logo, top right).
A longer winded option would be to use one of the hundreds of how to articles out there, for Raspberry Pis (regardless of Pi zero to Pi3 they are the same).
A quick Google search found this: https://learn.adafruit.com/adafruits-raspberry-pi-lesson-3-network-setup/setting-up-wifi-with-occidentalis
Or even (for those with shorter attention spans): https://www.google.co.uk/search?q=raspberry+pi+configure+wifi&oq=raspberry+pi+configure+wifi&aqs=chrome..69i57j0l5.6863j0j7&sourceid=chrome&ie=UTF-8#q=raspberry+pi+configure+wifi&tbm=vid
Good luck and don't be afraid to Google for these things.
If you run ifconfig -a, does your wlan0 interface have the proper IP address, 10.0.0.1? Mine did not. In /etc/network/interfaces I added the line
allow-hotplug wlan0
above the iface wlan0 line. That seemed to fix the address problem and the same error, "no address range available for DHCP request via wlan0" you are getting.
You have a problem with web pages then as nginx looks for pages in /var/www/html.
Use this line ...
sudo echo "<h1>hello<h1>" > /var/www/html/index.html
Note removal of "!" and different destination folder
I had the exact same problems you had and this got mine working for the most part.

Raspberry refuses to change IP

I am running raspin on an Raspberry Pi2 and I have configured it to have a staic IP on eth0 but it never changes it sticks to its DHCP lease. This is what I have in the interfaces-file under networking.
iface eth0 inet static
address 192.168.1.60
gateway 192.168.1.1
netmask 255.255.255.0
Have I done anything wrong? Am I blind? :)
Did you try restarting network?
/etc/init.d/networking restart
Not an answer to your question, but a workaround.
Add a static IP lease rule in your DHCP server, this is going to be your router in most cases.
Try restarting the RPi or network - the edited interfaces file doesn't take effect until you do that. Some routers also don't like you requesting a certain IP, so you can also set it to DHCP on the RPi and configure the router so that it always assigns a certain IP to the device.

How to fix ipaddress in CentOS?

I am using VMWare 10, in that installed CentOS 6.5 with two networking interfaces (eth0,eth1).
When I try to use the vmware, every time the ipaddress changes.
How to make the IP address constant (not a static IP address)?
Vmware will by default allocate dhcp ip addesses. In order to have static IP address, please assign static IP address in Centos using below steps
Static IP assignment for eth0
cat /etc/sysconfig/network-scripts/ifcfg-eth0
Sample output:
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="xx:xx:xx:xx:xx:xx"
NM_CONTROLLED="yes"
ONBOOT="no"
TYPE="Ethernet"
Configure eth0:
In above you can look that IP address is assigned dynamically using dhcp. Change this to below, make sure you aren't changing hwaddr, device - leave it unchanged.
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
HWADDR="xx:xx:xx:xx:xx:xx"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
IPADDR=192.168.1.2
NETMASK=255.255.255.0
service network restart
It will work now.