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[[File:ip. (DD-WRT .v24 with DNSMasq can handle that nicely.)<br/>This 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 network.<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 <pre>hostnamectl set-hostname --static newhostname</pre>Replace '''newhostname''' with a unique name of your choice. Apply this, with different hostnames, on both servers. You can make one '''hda''', for example, the Amahi links on each HDAother can be '''hda2'''s Fedora desktop , or something more distinct and created a launcher that opens the Amahi dashboard by IP address/or 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>Apps You Need</b></u> (Needs details)<br/>*Amahi Web-Apps Proxy (http://www.amahi.org/apps/amahi-web-apps-proxy) In order to prevent Domain Name Server conflict, you have to change the external DNS on both one of the HDAs. Access On "HDA2", change the Amahi Web-Apps Proxy for each HDA external DNS to point to the first time from a client computer outside IP address of the Local Area Network. Then "HDA1":<pre>hda-change the user name and password to suite your needs.-dns ipHDA1 ipHDA1<br/pre>*Ajaxplorer (http://www.amahi.org/apps/ajaxplorer) on HDA1<br/blockquote>*OpenVPN ALS (formerly Adito)(http://wwwIn our example '''ipHDA1''' is the default 192.amahi168.org/apps/openvpn-als) on HDA21. This app has 10, if your HDA uses a convenience fee to install that it is well worth itdifferent address (i.e. :-one you configured, instead of accepting the defaults)<br/>then use this address instead.
<u><b>=== Configuring OpenVPN ALS</b></u> Amahi HDA for SSL (Needs DetailsPort 443)<br/> <ol>===<li>Change HDA2 to listen on port 443<li>Web Forwards. Be sure URLs are entered as local area network addresses and then add ":port" if the app requires it.<li>Configure Shares</ol>See http://wiki.amahi.org/index.php/Adito for more details.<br/>*Complete steps of [[Access HDA over SSL]]
=== Optional ======= Apps You Might Need ====*[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>*[http://www.amahi.org/apps/ajaxplorer Ajaxplorer] installed on HDA1. This met my external file access needs for HDA1.<br/>*[http://www.amahi.org/apps/openvpn-als OpenVPN ALS] (formerly Adito) on HDA2. This app has a convenience fee to install that it is well worth it. :-)<br/><ul><br /> ==== Configuring OpenVPN ALS ====<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* Select Web Forwards (middle of left menu)* Select Create Web Forward* Select Tunneled Web and select Next* Enter Application Name and Description.* Check Add to Favorites and select Next* Enter '''<nowiki>http://application</nowiki>''' for Destination URL. <b>Router ConfigurationBe sure URLs are entered as local area network addresses, not dynamic DNS addresses</b>'''<nowiki>(i.e. http://subsonic.yourlocalhostaddress.com</unowiki>''' not '''<nowiki>subsonic.username.yourhda.com)</nowiki>'''. Local address are used since the VPN tunnel is creating an environment as if you were in the Local Area Network. For applications that use a port other than 80, you need to specify that as part of the URL, for example '''<nowiki>http://subsonic.yourlocalhostaddress.com:4040</nowiki>'''. Select Next.* Select Everyone, select Add, and select Next* Select Finish and select Exit Wizard* Keep in mind not all HDA apps will work outside your network* This method makes use of Adito Agent (java web agent)* 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 (Needs DetailsNetwork Places)]] for more details.<br/></ul><br/> === Router Configuration === This is the configurations under DD-WRT v.24-2
*Port Forwarding<br/>
*DHCP Server Static LeasesForward to IPofHDA1: Port 80 TCP/UDP, Port 1192 UDP, Other Apps possible<br/>Forward to IPofHDA2: Port 443 TCP/UDP, Port 4443 TCP/UDP (for OpenVPN ALS) and other apps possible. 
*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/> Under "DNSMasq" enable "DNSMasq" and "Local DNS".<br/>Under "Additional DNSMasq Options" input something like the following:<br/>
:server=/hda1username.com/192.168.1.20:ptr-record=20.1.168.192.in-addr.arpa,hda1username.com:server=/hda2username.com/192.168.1.21:ptr-record=21.1.168.192.in-addr.arpa,hda2username.com:expand-hosts<ubr/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: <bnowiki>Cutting Down Confusionhttp://couchpotato</bnowiki>and <nowiki>http://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.
 
-Places that "Need Details" I will edit more later.
12,424

edits