Как записать трафик внутри VPN?

12643
qbi

Я подключаюсь к серверу через VPN-соединение, и оно доступно только через это соединение. В то время как я обмениваюсь пакетами, я хочу в основном видеть, какие пакеты обмениваются и как сервер реагирует, когда он получает «неправильные» пакеты. Поэтому мне нужно посмотреть на VPN-соединение. Когда я попробовал это с Wireshark в Debian, я смог видеть только TCP-пакеты. Вы знаете, работает ли это с Wireshark? Как? Какой другой инструмент для записи (и, возможно, изменения) трафика я должен использовать?

7

1 ответ на вопрос

11
grawity

Sure. Just tell Wireshark to monitor the VPN interface, not the actual Ethernet/WiFi one.

Each packet gets routed to a specific network interface. Most correspond to physical network cards; there's a "loopback" one for 127.0.0.1 as well.

When you connect to a VPN, the software creates a virtual network interface, assigns it an IP address, and so on. (Usually a 'tun' or 'tap' device, though it's not always named such... I'm pretty sure vpnc uses 'tun'.)

Packets routed over that interface are sent to the VPN client, which encrypts them and sends inside new packets to the VPN server, which then get routed to the real WiFi device.

So whether you're trying to generate traffic, receive it, or monitor it, there's really no distinction between "inside" traffic and "outside" traffic, they just go through different devices, and you didn't tell Wireshark which one to capture on.

Проверьте ваш `ifconfig` или аналогичный, чтобы увидеть, на каком интерфейсе есть ожидаемый VPN-IP-адрес ... который должен дать вам несколько советов. BowlesCR 9 лет назад 1
Могу ли я использовать tcpdump вместо wireshark? Vikram 7 лет назад 0