Results 1 to 5 of 5
  1. #1

    FreeBSD Route Question

    So here is my problem.

    I have 2 servers: web and mysql

    Both are connected via a local lan and the wider net on 2 seperate nics (rl0 and em0). I need the traffic between the servers to always be on their respective rl0 devices over the network.

    TCPDUMP shows that on the one outbound side from the apache server that it seeks the packets are going to sql via the correct lan ip. However on the sql server the return packets are sent instead to the wan address. I need the return packets to direct toward the lan instead.

    I have both IPFW and PF setup. I am not sure if this is a route problem or a forwarding issue with the firewalls.

    Please help me if you can.

  2. #2
    Join Date
    Apr 2002
    Auckland - New Zealand
    Sounds like a route problem, as it looks like the return packets are going over your default gw on the other box.

    # route -n

    You might have to add the static route to use the correct interface.

  3. #3
    Yeah. I have to route properly. Working on it now. I almost have it.

    Just to help anyone in the future:

    route add -net -iface rl0

    That's what did it for me pretty much.

  4. #4
    Join Date
    Apr 2009
    One more way to see current routes in freebsd:

    netstat -nr

  5. #5
    Join Date
    Jul 2009
    im just curious why you had to do that ..what's the ifconfig setting on your /etc/rc.conf

    it should automatically create a static route based on your interface address ..unless your netmask is not set properly??

Similar Threads

  1. FreeBSD 2 nic one to route one to DB - how do I?
    By GNDI in forum Hosting Security and Technology
    Replies: 7
    Last Post: 08-31-2006, 06:08 AM
  2. trace route question
    By sgth in forum Dedicated Server
    Replies: 2
    Last Post: 12-04-2005, 10:25 AM
  3. add new default route for 2nd nic in freebsd
    By Pillhead in forum Hosting Security and Technology
    Replies: 8
    Last Post: 10-12-2002, 01:03 PM
  4. newbie trace route question
    By stephenn in forum Hosting Security and Technology
    Replies: 2
    Last Post: 08-29-2002, 11:21 AM
  5. FreeBSD Question
    By ClusterMania in forum Hosting Security and Technology
    Replies: 2
    Last Post: 01-16-2002, 11:36 AM

Posting Permissions

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