# Mangle and Port TeamViewer (Remote Dekstop) - MikroTik Script RouterOS

    TeamViewer is a proprietary software for remote access to as well as remote control and maintenance of computers and other devices, which was first released in 2005. The functionality has been expanded step by step, most recently for example through the integration of TeamViewer Meeting.

    Port forward TeamViewer:
    TCP/UDP: 5938/5938

    /ip firewall mangle
    add action=mark-connection chain=prerouting dst-port=5938 new-connection-mark=conn-TeamViewer protocol=tcp
    add action=mark-connection chain=prerouting dst-port=5938 new-connection-mark=conn-TeamViewer protocol=udp
    add action=mark-packet chain=prerouting connection-mark=conn-TeamViewer new-packet-mark=TeamViewer_pkt-up passthrough=no src-address=192.168.1.0/24
    add action=mark-packet chain=prerouting connection-mark=conn-TeamViewer dst-address=192.168.1.0/24 new-packet-mark=TeamViewer_pkt-down passthrough=no
    Credit: www.o-om.com