Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article walks you through the steps for encrypting the traffic between web nodes and compute nodes in Linux using self-signed certificates. If a compute node is inside the web node's trust boundary, then encryption of this piece isn't needed. However, if the compute node resides outside of the trust boundary, consider using the compute node certificate to encrypt the traffic between the web node and compute node. As a prerequisite, you can spin a 1-webnode-1-computenode enterprise configuration using ARM Template from here.
For Single Compute Node, use IP Address as Certificate Subject Name.
For multiple compute nodes, use DNS Suffix as Certificate Subject Name.
Example: say you have 2 compute nodes CN1.contoso.microsoft.com, CN2.contoso.microsoft.com, certificate subject name will be CN=contoso.microsoft.com.
cd /etc/ssl/certs
openssl genrsa -out privateKey.pem 2048
openssl req -new -x509 -key privateKey.pem -out publicCert.pem -days 3650 -nodes -subj "/CN=10.0.1.4"
openssl x509 -noout -hash -in publicCert.pem
ln -s publicCert.pem 0c73457b.0
apt-get install -y nginx
yum clean all
yum makecache fast
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y nginx
yum install -y epel-release
yum install -y nginx
Location of nginx.conf
Ubuntu: /etc/nginx/sites-enabled/default
RedHat and CentOS: /etc/nginx/nginx.conf
Modify the file in above location to the following contents :
server {
listen 443 ssl;
ssl_certificate /etc/ssl/certs/publicCert.pem;
ssl_certificate_key /etc/ssl/private/privateKey.pem;
server_name _;
location / {
proxy_pass https://127.0.0.1:12805/;
}
}
service nginx start
update-rc.d nginx defaults
systemctl start nginx
systemctl enable nginx
iptables –flush
systemctl start nginx
systemctl enable nginx
Launch the administrator's utility and restart the compute node
curl https://10.0.1.4/status
Should give a response like this:
{
"statusCode": 0,
"components": null,
"details": {
"rMaxPoolSize": 500,
"rActiveShellCount": 0,
"rCurrentPoolSize": 5,
"rCanOpenShell": "True",
"apiVersion": "1.0",
"logPath": "/usr/lib64/microsoft-r/rserver/o16n/9.1.0/Microsoft.RServer.ComputeNode/logs"
}
}
Copy paste the publicCert.pem and certificate authority into /etc/ssl/certs
scp root@10.0.1.4:/etc/ssl/certs/publicCert.pem /etc/ssl/certs
scp root@10.0.1.4:/etc/ssl/certs/0c73457b.0 /etc/ssl/certs
Open appsettings.json and modify the URIs :
"Uris": {
"Values": [ "https://10.0.1.4" ]
}
NOTE: If you have multiple compute nodes, make sure to enter all compute nodes information in the URI values. For example:
"Uris": {
"Values": [ "https://CN1.contoso.microsoft.com", "https://CN2.contoso.microsoft.com" ]
}
Launch the administrator's utility and restart the web node.
Verify the configuration by running diagnostic test on the web node.
NOTE: Self-Signed Certificates are NOT recommended for production usage. Please obtain certificate from Trusted Certificate Authorities for production usage.
Please sign in to use this experience.
Sign in