SlideShare a Scribd company logo
TELEPORT
BASTION JUMP-HOSTS WITH
https://faelix.link/netmcr19 — 5Mb
A BASTION IS A STRUCTURE
PROJECTING OUTWARD FROM THE
CURTAIN WALL OF A FORTIFICATION
"Bastion" — Wikipedia, 2018-01-10
DEFINITION
HARDENED AND MONITORED DEVICE
THAT SPANS TWO DISSIMILAR SECURITY
ZONES AND PROVIDES A CONTROLLED
MEANS OF ACCESS BETWEEN THEM
"Jump Server" — Wikipedia, 2018-01-10
DEFINITION
SZILAS, PUBLIC DOMAIN, VIA WIKIMEDIA COMMONS
IOT SECURITY
(NETMCR #11)
@kooky_uk Tim Bray
SHOUT OUT #1
SSH CERTIFICATES
(NETMCR #13)
@TimJDFletcher Tim Fletcher
SHOUT OUT #2
IOT SECURITY WITH PI.PE
(NETMCR #17)
@steely_glint Tim Panton
SHOUT OUT #3
RIPE ATLAS PROBE SECURITY
(AQL IOT ROUNDTABLE)
@kistel Robert Kisteleki
SHOUT OUT #4
WHY WAS I LOOKING AT THESE PROBLEMS?
THE TASK AT HAND
▸ Customers with "Internet access is slow".
▸ At first it seemed that NNI was in common…
▸ Then it seemed that last-mile provider was in common…
▸ Then we thought it might be web filtering solution…
▸ Is it carrier network congestion/loss… not that either…
▸ We need to test this from within the customer network!
WHY WAS I LOOKING AT THESE PROBLEMS?
THE TASK AT HAND
▸ Put some probe devices in some customer networks
▸ …to be able to "ssh" into them, run measurements.
▸ Don't want customers to have to open ports on routers.
▸ Some sort of NAT-piercing required.
▸ Security is vital:
▸ Don't want probe to be an attack vector into customer.
▸ Team of staff need access.
STANDING ON THE SHOULDERS OF GIANTS
RIPE ATLAS
▸ Plug it in, gets address/DNS by DHCP
▸ Connects to RIPE bastion hosts using ssh (with provisioning)
▸ Creates tunnels to itself for telemetry, read all about it:
▸ https://www.uknof.org.uk/uknof18/Kisteleki-Atlas.pdf
▸ Security rep is pretty good, e.g.
▸ https://www.mdsec.co.uk/2015/09/an-introduction-to-
hardware-hacking-the-ripe-atlas-probe/
STANDING ON THE SHOULDERS OF GIANTS
SSH BASTION HOSTS, WITH SSH CA
▸ The big players are doing it:
▸ https://code.facebook.com/posts/365787980419535/
scalable-and-secure-access-with-ssh/
▸ https://github.com/Netflix/bless
▸ How to apply this pattern to our "IoT" probe project?
A LONGER TALK, MAYBE AT UKNOF, WILL HAVE MORE INFORMATION…
THE SOLUTION
▸ Ansible script #1:
▸ Deploys Teleport on a VM (or cluster for HA)
▸ Ansible script #2:
▸ Installs Teleport on a Raspberry Pi
▸ Preconfigures Teleport (outbound connection to bastion host)
▸ Bunch of Raspberry Pi / case / SD card combos
▸ Ship to customers with instructions about placement
▸ Within few days of shipping: RCA = vendor firewall config issue
TELEPORT
USING
WHO NEEDS ANOTHER SSHD?
WHY BOTHER USING TELEPORT?
▸ ssh CA out of the box, compatible with OpenSSHd
▸ 2FA out of the box (TOTP or U2F), no google_authenticator.pam
▸ ssh through-the-web out of the box
▸ Compliance Officer's dream: session recording jumphost.
▸ …and with "session_recording: proxy" it can do this for
legacy sshd implementations too! [caveat: Security Officer]
▸ Free OSS < $aa$_startup_pricing_model < enterpri$$$e
▸ $paid_editions feature include RBAC, LDAP/SASL integration
cluster

of stuff
teleport

bastion
cluster

of stuff
you!
teleport

bastion
cluster

of stuff
tsh login

--proxy teleport.example.com
--user networkmoose
ssh-key -A
LOGGING IN
tsh login

--proxy teleport.example.com
--user networkmoose
ssh-key -A
LOGGING IN THE BASTION HOST
tsh ssh root@example.com
-L 8080:localhost:80
ssh
LOGGING IN
Bastion jump hosts with Teleport
SSH FEATURES BAKED IN
ON THE COMMAND-LINE
▸ Remote VM doesn't have ssh open to Internet.
▸ All access is going via tsh.fulcrm.org bastion.
▸ Can do port-forwarding.
SSH FEATURES BAKED IN
ON THE COMMAND-LINE
▸ Remote VM doesn't have ssh open to Internet.
▸ All access is going via tsh.fulcrm.org bastion.
▸ Can do port-forwarding.
PROBABLY WANT A SCRIPT
SSH FEATURES BAKED IN
ON THE COMMAND-LINE
▸ Remote VM doesn't have ssh open to Internet.
▸ All access is going via tsh.fulcrm.org bastion.
▸ Can do port-forwarding.
PROBABLY WANT A SCRIPT
AUTOMATION
SSH FEATURES BAKED IN
ON THE COMMAND-LINE
▸ Remote VM doesn't have ssh open to Internet.
▸ All access is going via tsh.fulcrm.org bastion.
▸ Can do port-forwarding.
PROBABLY WANT A SCRIPT
AUTOMATION
PLAYS
NICELY
WITH
ANSIBLE
(RTFM)
THE JESUS AND SSH-KEYCHAIN
MIX AND MATCH OPENSSHD AND TELEPORT
▸ Host blah.example.com

User salt

Port 3022

ProxyCommand ssh -p 3023 %r@teleport.example.com -s proxy:%h:%p
▸ ln -snf /usr/local/bin/tsh /usr/bin/ssh

ln -snf /usr/local/bin/tsh /usr/bin/scp
▸ …while using Ansible?
▸ scp_if_ssh = True
THE JESUS AND SSH-KEYCHAIN
TELEPORT AS CA FOR OPENSSHD
▸ tctl auth sign --host=yourhost.example.com --format=openssh
▸ HostKey /etc/ssh/ca_ssh_host_rsa_key

HostCertificate /etc/ssh/ca_ssh_host_rsa_key.pub
▸ You might have to…
▸ tsh login --compat=oldssh --proxy=teleport.example.com
▸ tsh ssh -p 22 root@yourhost.example.com
LABEL YOUR NODES (MASS COMMANDS)
SEE PREVIOUS SESSIONS
"TWITCH FOR TERMINALS"
CO-OPERATIVE MULTIPLAYER MODE!
TELEPORT
UNDERSTANDING
you!
proxy
auth
node client

(tsh or https)
you!
proxy
auth
node client

(tsh or https)
all-in-one
you!
proxy
auth
node client

(tsh or https)
bastion
node(s)
you!
proxy
auth
node client

(tsh or https)
all

separated
you!
proxynode client

(tsh or https)
RBAC

("enterprise")
auth
LDAP

SAML

etc
you!
proxies
auth
node client

(tsh or https)
HA auth
etcd /

dynamodb
load bal
you!
auth + proxy

& trusted cluster
auth
node

trusting cluster
client

(tsh or https)
bastionanother node
TELEPORT
ADMINISTERING
READ THE FINE MANUAL, MAKE A PLAYBOOK OR SALT STATE, DONE.
INSTALLATION
▸ Download binary, run installer (or compile your own)
▸ examples directory has systemd service file
▸ Create a user, let them login as root on any nodes:
▸ tctl users add marek root,postgres,www-data,…
▸ Follow enrolment link, set password, scan the QR code
ENROLMENT PROCESS
YOUR FIRST USER
ENROLMENT PROCESS
YOUR FIRST USER
▸ "netmcr" in teleport can
now login on nodes as local
"totallyunprivilegeduser"
ENROLMENT PROCESS
YOUR FIRST USER
▸ "netmcr" in teleport can
now login on nodes as local
"totallyunprivilegeduser"
GOT ROOT?
"WE'RE IN!"
GETTING DEEPER
MORE CONFIGURATION
▸ Limit your ciphersuites
▸ TLS cert for HTTPS
GETTING DEEPER
MORE CONFIGURATION
▸ Limit your ciphersuites
▸ TLS cert for HTTPS
▸ Static labels from
config
GETTING DEEPER
MORE CONFIGURATION
▸ Limit your ciphersuites
▸ TLS cert for HTTPS
▸ Static labels from
config
▸ Dynamic values from
running commands
periodically
GETTING DEEPER
POOR MAN'S ORCHESTRATION
GETTING DEEPER
POOR MAN'S ORCHESTRATION
GETTING DEEPER
POOR MAN'S ORCHESTRATION
tsh ssh root@debian=8.7
GETTING DEEPER
POOR MAN'S ORCHESTRATION
GETTING DEEPER
POOR MAN'S ORCHESTRATION
GETTING DEEPER
POOR MAN'S ORCHESTRATION
THANKS FOR
LISTENING!
ANY QUESTIONS?
e: marek@faelix.net
t: @maznu
w: https://faelix.net/
https://faelix.link/netmcr19

More Related Content

PDF
Ansible - Introduction
PPTX
Docker Networking - Common Issues and Troubleshooting Techniques
PPTX
Introduction to ansible
PDF
Apache Spark on K8S and HDFS Security with Ilan Flonenko
PDF
Common issues with Apache Kafka® Producer
PPTX
Best practices for ansible
ODP
Introduction to Ansible
PPTX
Hands on ansible
Ansible - Introduction
Docker Networking - Common Issues and Troubleshooting Techniques
Introduction to ansible
Apache Spark on K8S and HDFS Security with Ilan Flonenko
Common issues with Apache Kafka® Producer
Best practices for ansible
Introduction to Ansible
Hands on ansible

What's hot (20)

PDF
Automation with ansible
PPTX
Hypervisors
PPTX
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...
PDF
Infrastructure as Code with Terraform and Ansible
PDF
A Introduction of Packer
PDF
PDF
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
PDF
[OpenInfra Days Korea 2018] Day 2 - CEPH 운영자를 위한 Object Storage Performance T...
PPTX
Steering the Course with Helm
PDF
Red Hat OpenShift on Bare Metal and Containerized Storage
PDF
A Deep Dive into Kafka Controller
PPTX
Introduction to Ansible
PDF
Deploying CloudStack with Ceph
PDF
DevOps Meetup ansible
PPTX
HDFS Erasure Coding in Action
PPTX
OpenStack High Availability
PPTX
Automating with Ansible
PPTX
Tutorial: Using GoBGP as an IXP connecting router
PDF
Introduction to docker
PDF
Securing Kafka
Automation with ansible
Hypervisors
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...
Infrastructure as Code with Terraform and Ansible
A Introduction of Packer
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
[OpenInfra Days Korea 2018] Day 2 - CEPH 운영자를 위한 Object Storage Performance T...
Steering the Course with Helm
Red Hat OpenShift on Bare Metal and Containerized Storage
A Deep Dive into Kafka Controller
Introduction to Ansible
Deploying CloudStack with Ceph
DevOps Meetup ansible
HDFS Erasure Coding in Action
OpenStack High Availability
Automating with Ansible
Tutorial: Using GoBGP as an IXP connecting router
Introduction to docker
Securing Kafka
Ad

Similar to Bastion jump hosts with Teleport (20)

PDF
How we found a firewall vendor bug using Teleport as a bastion jump host
ODP
Nagios Conference 2013 - Leland Lammert - Nagios in a Multi-Platform Enviornment
PPT
PPTX
Introducing bastion hosts for oracle cloud infrastructure v1.0
PPT
Bh usa-01-kaminsky
PDF
Building a moat bastion server
PDF
Advanced open ssh
DOCX
Cent os 5 ssh
ZIP
Sshstuff
PDF
Dssh @ Confidence, Prague 2010
PPT
Presentation nix
PPT
Presentation nix
PDF
Passive SSH, a Fast-Lookup Database of SSH Key Materials to Support Incident ...
PPTX
PDF
OpenSSH: keep your secrets safe
PPTX
Shmoocon Epilogue 2013 - Ruining security models with SSH
PDF
Service intergration
PDF
SSH.pdf
PPT
SmartCloud Enterprise: Using a SOCKS Proxy with VLANs
PPTX
Ssh tunnel
How we found a firewall vendor bug using Teleport as a bastion jump host
Nagios Conference 2013 - Leland Lammert - Nagios in a Multi-Platform Enviornment
Introducing bastion hosts for oracle cloud infrastructure v1.0
Bh usa-01-kaminsky
Building a moat bastion server
Advanced open ssh
Cent os 5 ssh
Sshstuff
Dssh @ Confidence, Prague 2010
Presentation nix
Presentation nix
Passive SSH, a Fast-Lookup Database of SSH Key Materials to Support Incident ...
OpenSSH: keep your secrets safe
Shmoocon Epilogue 2013 - Ruining security models with SSH
Service intergration
SSH.pdf
SmartCloud Enterprise: Using a SOCKS Proxy with VLANs
Ssh tunnel
Ad

More from Faelix Ltd (9)

PDF
Net mcr 2021 05 handout
PDF
L2TP 101 ON-RAMP TO CONSUMING WHOLESALE BROADBAND SERVICES
PDF
VYOS & RPKI at the BGP as edge
PDF
Things I wish I had known about IPv6 before I started
PDF
Netmcr 40 - Salt + Netbox + Vyos = Network Automation + Routing Security
PDF
The Story of CVE-2018-19299 - finding and reporting bugs in Mikrotik RouterOS v6
PDF
Keeping your rack cool with one "/IP route rule"
PDF
MikroTik & RouterOS
PDF
SDN, CMDB, NMS ...CRM! How we're putting the customer at the centre of our ne...
Net mcr 2021 05 handout
L2TP 101 ON-RAMP TO CONSUMING WHOLESALE BROADBAND SERVICES
VYOS & RPKI at the BGP as edge
Things I wish I had known about IPv6 before I started
Netmcr 40 - Salt + Netbox + Vyos = Network Automation + Routing Security
The Story of CVE-2018-19299 - finding and reporting bugs in Mikrotik RouterOS v6
Keeping your rack cool with one "/IP route rule"
MikroTik & RouterOS
SDN, CMDB, NMS ...CRM! How we're putting the customer at the centre of our ne...

Recently uploaded (20)

PPTX
Digital Literacy And Online Safety on internet
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PPTX
presentation_pfe-universite-molay-seltan.pptx
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PPTX
innovation process that make everything different.pptx
PPTX
Mathew Digital SEO Checklist Guidlines 2025
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PPT
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
SAP Ariba Sourcing PPT for learning material
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PPTX
Introduction to Information and Communication Technology
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PPTX
Database Information System - Management Information System
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PPTX
artificial intelligence overview of it and more
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PDF
Sims 4 Historia para lo sims 4 para jugar
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
Digital Literacy And Online Safety on internet
INTERNET------BASICS-------UPDATED PPT PRESENTATION
Design_with_Watersergyerge45hrbgre4top (1).ppt
presentation_pfe-universite-molay-seltan.pptx
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
innovation process that make everything different.pptx
Mathew Digital SEO Checklist Guidlines 2025
Job_Card_System_Styled_lorem_ipsum_.pptx
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
SASE Traffic Flow - ZTNA Connector-1.pdf
SAP Ariba Sourcing PPT for learning material
An introduction to the IFRS (ISSB) Stndards.pdf
Introduction to Information and Communication Technology
Unit-1 introduction to cyber security discuss about how to secure a system
Database Information System - Management Information System
Slides PDF The World Game (s) Eco Economic Epochs.pdf
artificial intelligence overview of it and more
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
Sims 4 Historia para lo sims 4 para jugar
The New Creative Director: How AI Tools for Social Media Content Creation Are...

Bastion jump hosts with Teleport