7.1 Create Mail Server virtual machine
• Make sure that the "Firewall" virtual machine is running (see 4.2 Startup Firewall virtual machine)
Now you could log in directly in the virtual machine as user root, but connecting through SSH from your host PC, makes it possible to copy and paste text into the console window
• Open "Command Prompt" on your host computer
Write what is highlighted in red
Instead of writing "teddy", then write the username you have created on the master virtual machine:
C:\Users\teddy>ssh teddy@192.168.0.254 teddy@192.168.0.254's password:write your user's password here Last login: Wed Jan 1 11:05:00 2020 from 192.168.0.192 |
[teddy@firewall ~]$ su Password:write the root password here |
Edit the firewall bash file:
[root@firewall teddy]# cd /var/firewall [root@firewall firewall]# vim firewall.sh |
Add these lines to the end of the document:
# Forward SSH traffic from the external zone to the DHCP server using a dedicated port firewall-cmd --zone=external --add-forward-port=port=22003:proto=tcp:toport=22:toaddr=192.168.1.3 |
Save the document and quit vim
Shutdown the system, and exit "Command Prompt":
[root@firewall firewall]# shutdown -h now Connection to 192.168.0.254 closed by remote host. Connection to 192.168.0.254 closed.
C:\Users\teddy>exit |
• Return to the "Firewall" virtual machine
•
Click "X" to close the
virtual machine