Score:0

Setting tcp option to packet header

my flag

I'm trying to debug some networking issues and I'd like to add the "router alert" flag to some SYN packets that are being sent from my server. Is there a way to do that using iptables?

I'm looking at the mangle table but I couldn't find anything on adding arbitrary tcp header options to the packets. I imagine it would be something like iptables -t mangle -I OUTPUT -p tcp --dport 22 --tcp-flags SYN SYN -j [extension to add header] --header ra

Is there a way to do this?

EDIT: The specific option I'm looking to add is RTRALT - Router Alert

A.B avatar
cl flag
A.B
It can be *created* so by the application sending data using setsockopt() (see `man ip.7` IP_OPTIONS). Else you probably need iptables' NFQUEUE target and a tool like scapy (random Internet example: https://www.programmersought.com/article/98657955891/ )
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.