Professional Web Applications Themes

Adding a default route for a specific NIC - FreeBSD

I have a FreeBSD 4.11 server with two NICs -- one has a real IP (bge0) and the other has an internal IP (bge1, 192.168.42.6). The default route for the server (defaultrouter= in rc.conf) is the gateway for the real IP. How can I set a route such that traffic going out on bge1 goes through a different router, even if it's to the outside world? Basically, I have a jailed setup running with a private IP address. On the private network, there is a gateway machine that's setup to NAT the traffic out to the internet. Currently, I cannot ...

  1. #1

    Default Adding a default route for a specific NIC

    I have a FreeBSD 4.11 server with two NICs -- one has a real IP (bge0)
    and the other has an internal IP (bge1, 192.168.42.6).

    The default route for the server (defaultrouter= in rc.conf) is the
    gateway for the real IP. How can I set a route such that traffic going
    out on bge1 goes through a different router, even if it's to the
    outside world?

    Basically, I have a jailed setup running with a private IP address. On
    the private network, there is a gateway machine that's setup to NAT
    the traffic out to the internet. Currently, I cannot get out to the
    internet from the jail unless I set the default route of the entire
    server to be my internal NAT gateway.

    Any ideas?

    Thanks,

    Patrick
    patrick Guest

  2. #2

    Default Re: Adding a default route for a specific NIC

    To follow-up, I basically want to say:

    if traffic originals from 192.168.42.6, use 192.168.42.3 as the default gatway

    else use default gateway for bge0...

    Patrick


    On Apr 3, 2005 4:17 PM, patrick <com> wrote: 
    patrick Guest

  3. #3

    Default Re: Adding a default route for a specific NIC

    And one more bit of info that might be helpful to know...

    The jail I've setup will serve sites on various IP addresses. Since
    FreeBSD jails by default only allow one IP, I've given the jail an
    internal IP, and am just forwarding the desired ports on the external
    IPs into the jail's IP using ipfw. This is all working fine, so the
    only thing left for me to solve is how to get things in my jail
    working so that I can make outbound TCP connections.

    Thanks again,

    Patrick

    On Apr 3, 2005 4:17 PM, patrick <com> wrote: 
    patrick Guest

Similar Threads

  1. Establishing a VPN connection takes my default route over.
    By Jean-François Lacrampe in forum Mac Networking
    Replies: 3
    Last Post: September 21st, 03:30 AM
  2. Replies: 2
    Last Post: September 5th, 02:01 PM
  3. os-9 default route
    By Deana in forum Linux / Unix Administration
    Replies: 2
    Last Post: August 28th, 06:21 PM
  4. Default route changed automatically
    By Chalawal Maliwan in forum SCO
    Replies: 0
    Last Post: July 23rd, 01:52 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139