Access Antlets
Last updated
Last updated
If you setup an antsle.us subdomain in antHill, you can use the antlet name with your subdomain,
In either case, the antlet must have a web server installed and listening on port 80 (http), else you may get a '502 Bad Gateway' error.
See the SSL (https) page for https access to an antlet.
There are several ways you can SSH to your antlets
From the edgeLinux terminal
Direct to the antlet using a bridged NIC
Just login to Antsle's command line as shown in "Log in to the edgeLinux OS then open a new SSH session into your antlet. e.g. antlet has IP address 10.1.1.12
The default username for all of our Linux templates is 'root', with the exception of the Ubuntu KVM template which has a default username 'ubuntu'. See the Templates page for default passwords.
In this example we are not required to include the username 'root' because, if omitted, SSH will use the name of the currently logged in user. The terminal prompt shows that 'root' is currently logged in.
If you have configured a bridged virtual NIC on an antlet you can SSH directly to the IP address of the bridged interface.
You can create an entry in your local SSH config
file to make an SSH connection with a single command to an antlet with the ProxyJump keyword.
The 'config' file is located in HOME/.ssh/ directory
A typical entry looks like this where shazam is my antsle
This allows you to SSH to 192.168.1.33 with this command
You can then use 'shazam' as a ProxyJump host to an antlet with a config
entry like the following
In the example above, 10.1.1.11 is the IP address of the antlet and an entry for the host 'shazam' exists in the config
file. Now you can start an SSH session to webserver1 with
To make things a bit easier, first copy your local ssh key to the antsle
Create your antlet and start it up. Once started you'll see a button for quick access to your VNC Console
A window will open up that directly displays your desktop. If you're using one of our prebuilt templates, just use the template's default password to log in and you're ready to go.
If you're running Windows, open the tab on the left side and click "special keys" you can then click the option for CTRL+ALT+DELETE which will allow you to type in your username and password.
After having logged in via ssh, install all the software you want. Use package managers such as apt-get in debian or Ubuntu, yum in CentOS or Fedora, or pkg in FreeBSD to install your software. To get started, you might try this guide or this one.
To make the web apps installed in your antlets accessible, edgeLinux provides a reverse proxy using a software package called nginx.
See how easy it is to get web access to your antlets:
Access antlets via domain name (below)
If you want to configure Antsle so that the world can access your antlets by domain name, e.g. myawesomesite.com, then this page will guide you through the steps to do that.
Before you start, you need to setup port forwarding in your router. That step is only needed once. You don’t need to do that for every new domain name and/or antlet. You can skip port forwarding altogether if you (a) only access antlets from your local LAN/WiFi or (b) you’re using a tunnelling solution.
After you’ve setup port forwarding in your router (once), it’s a three-step process:
Get a domain name.
Set the A record.
Connect domain with antlet.
Here are our instructions for each of these steps:
You can register your domain name, e.g. mysite.com, through any domain registrar of your liking, e.g. godaddy.com.
Set the A record of your new domain to the public IP address of your home or office Internet connection. To check your IP address, just go to checkip.dyndns.org in your browser. Copy that IP address to your clipboard. The go to the portal of the registrar that you bought your domain from. In case you bought it from GoDaddy, see here for help.
Go to “DNS settings” and find where to set the A record. Set it to the IP address that you found out earlier.
After you’ve changed the A record, please allow up to 48 hours to let that change propagate through all DNS server of the Internet. In many cases you will be able to use the new domain after two hours or so. It’s a good idea to restart your router a few hours after you’ve updated the A record, so that the router will pull the latest DNS information from the Internet.
Please keep in mind that this step works best when you have a static IP address from your ISP. Alternatively, you can use a dynamic DNS provider.
After steps 1 and 2 are done, any traffic for your domain will arrive in your router. The port forwarding in your router will send it onwards to your Antsle - forward ports 80 and 443 to the private IP address of the Antsle (displayed in antMan). The last step now is to tell the Antsle to connect the domain name to the antlet of your choice. In order to achieve that, follow these steps:
Login to your Antsle via ssh root@antsle_name.local
.
Enter this command: cd /etc/nginx/virtualhosts
.
Then enter this command: nano mysite.com.conf
. Use your domain name, not mysite.com
!
Paste this text into the file:
Make sure to replace mysite.com
with the your own domain name, and replace 10.1.1.10
with the IP address of the antlet you want to connect this domain name to.
The intent of the first 'server { ... }' block is to redirect URLs prefixed with www to a URL without it, e.g. 'www.mysite.com' will redirect to 'mysite.com'. Many people always type a 'www' in the URL but is not part of many domain names.
If your domain name is prefixed with www or you are using some other subdomain like yoyo.mysite.com, you can delete the first 'server { ... }' block
and edit the second 'server { ... }' block with the full domain name.
Press Ctrl-X
in nano, enter Y
for Yes when asked if you want to save, and hit Enter
for the file name.
Finally, enter this command: service nginx restart
You’re ready to go now. From anywhere in the world, mysite.com will lead you directly to your antlet now.
To set up an ssl certificate for an antlet we have a couple of options
Install the certificate in the antlet
Use nginx proxy to handle the certificate
The first option requires the antlet to have a bridged NIC and be addressed directly. The traffic for each antlet/webserver would require a unique public IP address or use a unique port number for the router to direct the traffic to the correct antlet IP address. Here the certificate files are installed and handled by the antlet
The second option allows nginx to connect to the proper antlet based on the URL in the header of the request. This is desireable because you can forward traffic (at the router) for multiple sites to one IP address, the private IP address of the Antsle. The certificate files are installed and handled by nginx on the edgeLinux OS.
First create a directory for your certificate files on the edgeLinux OS.
Use SCP or SFTP to copy your certificate files to this directory.
Create and edit a new nginx virtualhosts configuration file for your domain name. Replace example.com with your domain name.
Paste the following content into the file and replace 'example.com' with your domain name.
Restart the nginx service