Score:0

How i can change ping (icmp) packet size by iptables in VPS?

do flag

How i can change ping (icmp) packet size from default (64 byte) to 1 byte with iptables for both VPS input and output ping to specific IP in VPS?

I executed this command but when I get ping again 64 bytes sent for each request.

For input

iptables -A INPUT -p icmp --icmp-type echo-request -s <IP_address> -m length --length 1 -j ACCEPT

For output

iptables -A OUTPUT -p icmp --icmp-type echo-reply -d <IP_address> -m length --length 1 -j ACCEPT

Score:0
gn flag

The answer is that you can not.

iptables is for packet filtering and/or redirecting and/or changing IP addresses, i.e Network Address Translation. It can not be used to fundamentally change an ICMP ping packet in the why you desire.

By the way, the default ICMP packet size of 64 bytes is for 56 bytes of payload and 8 bytes of ICMP header data, so a packet size of 1 byte is not possible.

Kingphoenix avatar
do flag
So, there is no solution at all to reduce the each ICMP packet size in a tunnel created based on the ICMP protocol? Because for every 1MB of data passing through the ICMP tunnel, approximately 6MB used. I created ICMP tunnel between two VPS with this script. https://github.com/esrrhs/pingtunnel
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.