Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What I want to do is conceptually very simple, but I can't find any information or help about how to go about doing this.

Basically, I want to configure my networking to use source routing (LSRR). Now I know there are "security concerns" with this and hence it is generally blocked in the public Internet and so the tutorials reach dead ends. However I have a totally private network, and need to do this for some engineering reasons. [Basically, I'm doing some experiments where I want to "simulate" a hop by hop routing protocol]

So, I want to send traffic from (machine with IP address) A to (machine with IP address) X. But I want the traffic to follow a specific route via intermediate nodes B, C, then D i.e A -> B -> C -> D -> X. These are all private IP addresses and I have configured the proper ip_forwarding etc .

Ping actually allows you to use a LSRR, so I can ping from A to X via these intermediate nodes (using that route I specified) and can verify that it is actually happening with wireshack traces, and it works fine.

The question then is how can I use some features of iptables, or tun interfaces (or other - VPN?) etc to redirect all my normal traffic along this route using loose source routing? Basically, I would like to implement something at A, so that when I try to send traffic from A to X it intercepts those IP packets and adds the LSRR to them so that it forwards on via the specified intermediate points.

If anyone can help me, I would be extremely grateful as I can't seem to work out how to do this?

Thank you very much, Triponi

share|improve this question
This is not as simple: Those source route headers reduces the MTU. – BatchyX Jun 22 '13 at 19:15

The answer is pretty simple: Source routing creates many, many entertaining ways to wreak havoc, and is of little use in practice (perhaps for diagnosis, once each three blue moons). So most modern networking gear just ignores that.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.