Changes

From Amahi Wiki
Jump to: navigation, search
no edit summary
Make sure both HDA use different domain namesThis was tested and compiled using Fedora 25 / Amahi 10.
You'll need to re-apply this fix on every update of hdactlUpdated and amended by [[user:Spaceman | spaceman]] 17:33, 27 March 2017 (BST).
You=== Prerequisites ===*A router that can hand out DNS. (DD-WRT .v24-sp2 which comes with DNSMasq can handle that nicely.) Find out more at http://www.dd-wrt.com/site/index<br/>*This document assumes that Fedora 23 & Amahi are installed (but see 'll need to run the commands below on both ''Issue each HDA a unique IP address and hostname''' before deploying your HDAssecond HDA).<br/>
You'll need to edit named.patch before executing the patch command:<br/>On your main HDA: replace home.com with your second === Issue each HDA domain name, and 192.168.1.10 with your second HDA real a unique IP address.<br/>and hostname ===On For convenience edit the IP Address ''when building'' your second HDA: replace home.com with your main HDA domain name, and 192.168.1.10 with you ("HDA real IP address").<br/>
[[Open_Terminal_as_root|As '''root''' user:]]{{Code|wget When stepping through the build process (as circled in red), modify the static IP pre-O named.patch httpconfigured in the Amahi control panel://wiki.amahi.org/images/c/ca/Named.patchpatch -p0 < named.patchservice hdactl restart}}
<hr>[[File:start.jpg|450px]]
The above instructions no longer work on current versions of AmahiSelect '''Start building a new HDA'''
Here The next step sets the '''IP address''' of your HDA and router ('''Network Gateway'''). If this is the second HDA you are building change the IP address to something distinct from your first, for example 192.168.1.20 (only change the steps that I followed: fourth octet of the IP address (This may be very specific to my setup so take it as it is.circled in red):
<u><b>Prerequisites</b></u><br/>*A router that can hand out DNS. (DD-WRT .v24-sp2 which comes with DNSMasq can handle that nicely.) Find out more at http[[File://www.dd-wrt.com/site/index<br/>*This document assumes that Fedora 14 & Amahi are installed on both HDAs.<br/>*BE SURE that each HDA has a unique hostname (domain name) & IP address that is within your networkip.<br/>jpg|450px]]
Check this has applied:<u><bpre>Accessing HDAs Locallyhostname</b></u><br/pre>You have to access BOTH the shares and the dashboard of each server by IP address of the HDAThe output should simple be your '''newhostname'''. <br/><blockquote>For example, "\\192.168.1.20" in Window will get you to the shares on the HDA with that IP address, if you have established a user and password for that client. Also, 192.168.1.20 in a web browser will take you to the dashboard of the HDA with that IP address.</blockquote>
I personally deleted all of the Amahi links on each HDA's Fedora desktop and created a launcher that opens the Amahi dashboard by IP address.<brpre>hostnamectl set-hostname --static newhostname</pre>To create the launcher*Right-click on an empty space of the Fedora Desktop and choose "Create Launcher"*Change "Type" to "Location."*Give it Replace '''newhostname''' with a unique name (iof your choice. eApply this, with different hostnames, on both servers. <i>Amahi HDA Dashboard<You can make one '''hda''', for example, the other can be '''hda2''', or something more distinct and/i>)*Under "Command" enter http:// and the IP of the HDAor meaningful.
=== Accessing HDAs Locally ===You have to access BOTH the shares and dashboard of each server by IP address of the HDA. <u><b>Change External DNS on HDA2</b><br/u><br/blockquote>In order to prevent Domain Name Server conflictFor example, "\\192.168.1.20" on a Windows client will get you have to change the external DNS shares on one of the HDAsHDA, ''with that IP address''. On HDA2Also, change 192.168.1.20 in a web browser will take you to the external DNS to point to dashboard of the HDA: ''with that IP address of HDA1. In terminal .''..{{Code|hda-change-dns ipHDA1 ipHDA1}}
<u><b>Configuring Amahi HDA In order to prevent Domain Name Server conflict, you have to change the external DNS on SSL Port 443one of the HDAs. On "HDA2", change the external DNS to point to the IP address of "HDA1":</bpre>hda-change-dns ipHDA1 ipHDA1</upre><br/blockquote> In our example '''ipHDA1''' is the default 192.168.1.10, if your HDA uses a different address (i.e. one you configured, instead of accepting the defaults) then use this address instead.
=== Configuring Amahi HDA for SSL (Port 443) ===
Change HDA2 to listen on port 443
*Complete steps of Amahi Wiki "[[Access HDA over SSL" (http://wiki.amahi.org/index.php/Access_HDA_over_SSL)]]
<u><b>=== Optional ======= Apps You Might Need</b></u><br/>====*Amahi Web-Apps Proxy ([http://www.amahi.org/apps/amahi-web-apps-proxy) Amahi Web-Apps Proxy] on both HDAs.
<blockquote>*Go to the Amahi Dashboard and under "Apps" find and install Amahi Web-Apps Proxy. In order to configure Amahi Web-Apps Proxy, access the Amahi Web-Apps Proxy for each HDA the first time from a computer <u>outside</u> of the Local Area Network. Then change the user name and password to suite your needs.</blockquote>
*Ajaxplorer ([http://www.amahi.org/apps/ajaxplorer) Ajaxplorer] installed on HDA1. This met my external file access needs for HDA1.<br/>*OpenVPN ALS (formerly Adito)([http://www.amahi.org/apps/openvpn-alsOpenVPN ALS] (formerly Adito) on HDA2. This app has a convenience fee to install that it is well worth it. :-)<br/><ul><br/>
<ul><u><b>==== Configuring OpenVPN ALS</b></u><br/>====
<li>Web Forwards - The Tunneled Web Apps feature of OpenVPN ALS (Adito) allows clients to externally use an application on your HDA as if they are in the Local Area Network.
* Login as administrator
* Each time the agent is executed, the SSL tunnel uses a random port (may not work with firewalled client network)
<li>Configure Shares. See "[[Adito#Configuration_Options|Map HDA folders (Network Places)" on http://wiki.amahi.org/index.php/Adito ]] for more details.<br/>
</ul>
<u><bbr /=== Router Configuration</b></u><br/>=== 
This is the configurations under DD-WRT v.24-2
*Port Forwarding<br/>
*Turn off DHCP in both HDAs. Allow DD-WRT to handle DHCP.<br/>
First enable '''Settings''' | '''Advanced Settings''' in your HDA's Dashboard (circled red):
 
[[File:settings.jpg]]
 
In the '''Network''' section select '''Settings''' and ''untick'' the '''DHCP Server''' checkbox (circled in red) from '''both''' HDAs.
 
[[File:dhcpserveroff.jpg]]
 
Under "Services > DHCP Server" in DD-WRT set "Used Domain" to "LAN & WAN"<br/>
Give the router's LAN a name and assign static DHCP leases for each HDA using the real MAC address, hostname and IP of each.<br/>
*DO NOT turn off DNS on ''either '' HDA.<br/>
*DD-WRT Dnsmasq config. The DNSMasq feature in DD-WRT allows you to direct DNS requests to the each of the DNS servers of the respective HDAs. This prevents one HDA from taking over DNS and preventing the other from using its DNS driven apps.<br/>
:ptr-record=20.1.168.192.in-addr.arpa,hda1username.com
:server=/hda2username.com/192.168.1.21
:ptr-record=1221.1.168.192.in-addr.arpa,hda2username.com
:expand-hosts<br/>
Just change the above to reflect your hostnames and IP addressess. (Note that ptr-record ips are backwards.)
=== DNS Aliases ===To access apps installed on the HDA that is '''not''' servicing DNS queries you will need to add '''DNS aliases''' to point to the ''other'' HDA (in the following example HDA2 is 192.168.0.100): Note the application on "HDA2" are directed to 192.168.0.100, if you have used the settings listed above your second HDA will have the IP address 192.168.1.20 instead. [[File:dnsaliases.jpg]] This will allow you to access apps, in this example '''Couchpotato''' and '''Mediawiki''', by entering in your browser: <unowiki>http://couchpotato<b/nowiki>Cutting Down Confusionand <nowiki>http:/b></u>mediawiki<br/nowiki>respectively. === Cutting Down Confusion ===If you want to avoid confusion as to which server dashboard you are working on at the moment, you use an different theme on each Dashboard. Alternatively, you could ''edit '' the Dashboard theme. Look in the Theme directory.{{Code| /var/hda/platform/html/public/themes/main}}
Using GIMP2 I added "HDA#1" to the "logo.png" right under the Amahi logo. Then I did the same to HDA#2.
12,424

edits