There are many cases where two networks have to be connected on Layer 2 in a
virtual fashion, which is referred to as a Virtual Private Network (VPN).
Typically you would use OpenVPN or similar software
for that. All of these tools have in common that they require some non trivial
setup steps like setting up a PKI or exchanging keys or certificates in a
safe way.
As a programmer, setting up a full fledged VPN software for a development
environment which is destroyed regularly seems not be the best option. A
question that normally comes to my mind in these moments is:
Can I use SSH for that?
The answer is usually YES, like in this case. For the first part of an ongoing
series about little known SSH features, we’ll take a look at the -w
command
line flag which allows bridging of two ethernet networks using tap
-devices.