Setup an Ubuntu VM as SFTP Server for NSX-T backup

In this blog, I will be setting up an Ubuntu Virtual Machine  as a SFTP Server for NSX-T config backups.

  • Set an Ubuntu Server , I used the below release

animeshd@sftp:~$ lsb_release -a

Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic

  • Installed VMware tools on the Ubuntu machine.
  • Install latest updates to the Ubuntu Machine using : sudo apt-get update (assume internet access is there)
  • Next , Install an Openssh Server using : sudo apt install openssh-server

check the status of ssh – running


Next, using putty ssh to the server, and take the backup of /etc/ssh/sshd_config file.

In the current example, I took a backup of the file under the tmp directory as /tmp/sshd_backup.


As the original file is read only, use chmod 777 against the /etc/ssh/sshd_config file to edit it. Use an editor of your choice on the system, I used Nano editor to the open the file for editing.

  • Edit the ListenIPaddress and add the IP of the local machine.


  • Then change X11Forwarding no   (change from ‘yes’), and then add the overriding settings as per the screenshot below.


Here’s what each of those directives do:

  • Match User tells the SSH server to apply the following commands only to the user specified.
  • ForceCommand internal-sftp forces the SSH server to run the SFTP server upon login.
  • PasswordAuthentication yes allows password authentication for this user.
  • ChrootDirectory /var/nsxtsftp/ ensures that the user will not be allowed access to anything beyond the /var/nsxtsftp directory.
  • AllowAgentForwarding no, AllowTcpForwarding no. and X11Forwarding no disables port forwarding, tunneling and X11 forwarding for this user.

Restart the ssh service on the machine

  • Now, I have created these directory and user in the on the SFTP Ubuntu machine.

Create a new user

  • sudo adduser –shell /bin/false nsxtbackupuser

Create a new directory

  • sudo mkdir -p /var/nsxtsftp/backups

Change owner and  permission on the new directory

  • sudo chown root:root /var/nsxtsftp
  • sudo chown nsxtbackupuser:nsxtbackupuser /var/nsxtsftp
  • sudo chown 755 /var/nsxtsftp

Once, this is done use the NSX-T UI, under system go ahead and edit and configure backup to the backup server.


Then, perform a backup and view the result.


Backup files are getting created.















NSX-T Part 10: Configure N-S Routing

In the previous part, we have setup the T1 router and connected all the logical switches with its gateway configured on it. In this part after the Edges are deployed, we will be configuring the N-S routing for VMs to reach the external network.


We have just the T1 router currently available, now we will start with configuring the T0 router.



I have deployed it in Active-standy state as I will be using this setup for future deployment of PKS or Kubernetes.


Next, I connected the T1 router to T0 router.


As seen below, now the T1 router is connected to T0 router.


Next is to connect the Edges upstream to the VLAN network. In the previously setup, we had the VLAN-TZ setup and now we are first adding a VLAN backed logical switch for upstream connecting. As the lab is in a nested environment , VLAN 0 does fine 🙂


Quick summary of the T0 router below.


Next, is to connect the edges upstream with the VLAN logical switch and thus we need to configure the router ports on the T0 router on the below screen.


Below is the configuration output from the VYOS router which is being used for both my NSX-V and NSX-T environment.


Created a new Router port in the below screen, with the ip address used on the same L2 network


Similarly, we configured two router ports as we will be using BGP routing between the VYOS router and edges. We already know that on the standby edge , NSX automatically prepends the AS-Path to make it a less preferred route and thus no changes are required on the upstream router.


Below we do the BGP configuration .



Similarly, we configure the routing for each edge router port.


Next, is to advertise the T1 routes upstream which is the all connected routes.



Quick recap on the logical networks connected to T1.


Next step is to validate the routes on the Active Edge. Firstly, we get the logical router available.


Login to the specific T0 SR component (as SR is responsible for routing N-S)


Check the routes, and we see that upstream and NSX-V environment routes are learnt through the VYOS router.


Below is the neighbor summary of the VYOS router.


This completes the NSX-T setup configuration. In future, I am planning to upgrade this setup to NSX-T 2.4.x release , as there are additional features available on the same.

Hope, this 10 part series was helpful.

NSX-T Part9: Configure Edge Cluster

In this part continuing with the edges configuration, we will configure the edge cluster. Before we create a new edge cluster, an edge cluster profile needs to be used.

There is already a default profile which is available.


However, I created a new Edge Cluster Profile as I do not want to use the default one.



Then I created a new Edge cluster and added both the previously created Edges into the newly created edge cluster.





Post which we bind the edge cluster profile to the edge-cluster profile.


In next part , I will configure the logical routing.


NSX-T Part8: Configure Edge nodes

In the previous part , I got two Edge VM nodes deployed. In this part we will configure them to function as an edge node . The first step is to configure an Edge Uplink Profile.

Initially, I configured the Edge using the earlier created Overlay Uplink profile in which  there was an active and a standby uplink , and was getting the below error .


I had to quickly change that and only configure with one active uplink, posted this for all your information if you run into this issue.

Create a new Edge-Overlay uplink profile


Create a new Edge-VLAN uplink profile.


All the Uplink profiles which are created.


Create a new Transport Zone . As we had already created the Overlay Transport zone for configuring the logical switches, we just need to create a new VLAN-Transport zone.


Configured both the edge-node VMs as a Transport node. Added both the overlay and VLAN transport zone as part of the edge transport zones.


tswitch1 configured for overlay


tswitch2 , new switch created for VLAN outbound connectivity to physical wordl.


Similarly, I configured both the edges as Edge Transport node


In the next part, I will continue with the Edge-cluster configuration.