Find the answer to your Linux question:
Results 1 to 2 of 2
Guys I'm wondering if somehow i can route a packet based on the modem it came from... so if my default route is 10.0.0.2 and a packet comes from the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    2

    routing packets based on modem


    Guys I'm wondering if somehow i can route a packet based on the modem it came from...

    so if my default route is 10.0.0.2

    and a packet comes from the external address 60.20.30.40 to 10.0.0.2(router) then to linux box it will work

    however their next packet comes from 134.45.66.3 to 10.0.0.4(routerB) to linux box, it will fail, because my linux box is responding back via 10.0.0.2 (default gw)

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,380
    You might be able to use iptables to do this. You can associate a particular IP address with a specific gateway, so any replies to that IP address should use the associated gateway. I'm not too familiar with iptables as yet, but it should (I would think) be possible to associate a range of addresses (netmask?) with a particular gateway as well.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •