Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   U     0      0        0 eth0     U     0      0        0 eth0         UG    0      0        0 eth0

this is current kernel routing table.

I want to add entry by following command.

route add -net netmask gw is subnet that i configure using Honeyd that is running on

but route command gives error- SIOCDELRT: No such process.

so help me to add this entry in routing table.


You can only set gateways on local subnets. This is because once you give a packet to another machine, it's free to route the packet any way it wants. So you might say "look, I want to route this packet destined for via, so to get the packet there I'll pass it to", and then when you hand the packet to, it says "nah, I reckon packets to should be routed to", and the packet doesn't go where you need it to go.

What you need to do is either get a direct connection to, or else tell (and any other routers along the way) that it should route traffic to in the direction of Luckily, the "direct connection" can be a tunnel of some sort (VPN, GRE, etc), so you don't necessarily have to lay any cable.

  • but I'm able to add entry by following command- route add -net netmask gw – Avinesh Kumar Jul 13 '12 at 10:15
  • so why I can not add as gateway . – Avinesh Kumar Jul 13 '12 at 10:19
  • The first sentence of my answer covers that question. – womble Jul 13 '12 at 10:24
  • so Is there another way of doing this other than configure router routing table?. – Avinesh Kumar Jul 13 '12 at 10:27
  • can you elaborate this line - Luckily, the "direct connection" can be a tunnel of some sort (VPN, GRE, etc). because i'm not aware of deep knowledge of networking. – Avinesh Kumar Jul 13 '12 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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