SNMP over SSH tunnels

Sometimes you just need to tunnel UDP based protocols – such as SNMP – and the easiest ways is to use socat


socat tcp4-listen:6667,reuseaddr,fork UDP:DESTINATION:161
socat udp4-listen:161,reuseaddr,fork tcp:localhost:6667

And in combination with your normal SSH tunnel


ssh -L6667:localhost:6667 BASTION_HOST

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>