How to route packets from tunnel interface to ethernet 0?

Hi all,

I have created tunnel in ubuntu using /dev/net/tun. when I send packets from eth0 interface to tunnel ip address. able to receive Packets using tunnel read. which I can see it in wireshark.

But when I write packets through the tunnel with destination address as eth0 address. packets doesn’t reaches eth0 interface. I tried iptables for routing, Also I changed net.iv4.ip_forward = 1 in sysctl.conf file .but it doesn’t work.How to configure IP tables ? Help me to resolve this issue.

Thanks, Sathish


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


With the information available it’s not entirely clear how you are trying to route things or what the end goal is. So it’s hard to provide an accurate answer. Can you please go into more detail what you are trying to do. What you have tried that hasn’t worked, etc?

It’s important to understand that when asking a question to provide as much information as you can. This allows those trying to help to replicate and try to find a solution.

This sounds like something you could do through IPTables, but the current question is a bit broad to know or provide a specific precise answer. If you can go into greater detail, there may be a solution we can provide.