Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Oct 2002 12:29:55 -0600
From:      James Earl <james@icionline.ca>
To:        Steven King <cking@blessed.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Dual-Homed
Message-ID:  <20021009122955.4f3d98c6.james@icionline.ca>
In-Reply-To: <3DA4144B.8010509@blessed.net>
References:  <3DA347ED.6080305@blessed.net> <20021008165041.11807165.james@icionline.ca> <3DA36448.8070703@blessed.net> <1034133647.3da3a08f25e51@webmail.telusplanet.net> <3DA4144B.8010509@blessed.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wed, 09 Oct 2002 07:34:35 -0400
Steven King <cking@blessed.net> wrote:

> I have tried setting up a static_route in rc.conf for iface2 but no joy 
> there.. And I agree that it sounds like a routing/default gateway 
> problem but I cant seem to figure out how to fix it.. I'm thinking that 
> the dhcp is setting up a default gateway for both interfaces instead of 
> setting it up for just iface1 and when I try to reach the internet from 
> iface2 it tries to go out iface1.. small example:
> 
> traceroute -s iface2 to router off hub2 (same subnet as iface2) - No problem
> traceroute -s iface2 to internet site - broken.. doesn't even reach the 
> router nor do I see the hub lights blink.
> 
> Not sure how I can tell the DHCP to just load the default gateway for 
> iface1 and not iface2 and let me set that manually in rc.conf..

/var/db/dhclient.leases will show you what dhclient is picking up from your dhcp server.  It will definitely pick up a router from the dhcp server, otherwise home users wouldn't be able to get on the internet..

>
> 
> I can access the internet on both sides when they are setup seperatly.. 
> I can also access the internet through iface1 when both are set up at 
> the same time.. just not iface2..
> 
> and your third question.. I want to be able to access the internet 
> through both interfaces plus be able to get to the machine through both 
> interfaces..

This is one thing I'm not too certain about.  It seems to me, that to be able to access the Internet through both devices, would require some ip filtering so that certain applications (that you'd configure) requesting to connect to certain ports are directed through the interface you want them to go through.

The only thing that I'm aware of that comes close to this, is natd, but I've only set that up so it redirects incoming traffic destined to port whatever, to a specific machine on the LAN.  I don't see why it couldn't work in the reverse for you.  You might need to get imaginative here... :)

>
> 
> Hope I'm not confusing things more..
> 
> 
> 
> James Earl wrote:
> 
> >You show a "Router" after "Hub2."  Have you tried setting up a route to get 
> >past it?  If you can only see the machines on the same subnet as interface2 
> >then initially it sounds like a routing problem.
> >
> >Can you access the internet through each interface when they're setup 
> >separately?
> >
> >You mentioned you have to use interface2 for a "web server, mail and dns."  
> >Are you wanting to only provide connections in through interface2 to your 
> >FreeBSD machine, or are you trying to use both internet connections from one 
> >FreeBSD machine?
> >
> >
> >Quoting Steven King <cking@blessed.net>:
> >
> >  
> >
> >>Well I want to treat interface1 as my primary route for most things 
> >>(cvsup, lynx, etc, etc..).. and treat  interface2 as if it was an 
> >>alias'ed IP.. But for some reason when I boot up with rc.conf like the 
> >>way I have it below, you can not reach interface2 from the internet nor 
> >>can you reach the internet from interface2.. I can only get to other 
> >>machines that are on the same subnet as interface2..
> >>
> >>
> >>James Earl wrote:
> >>
> >>    
> >>
> >>>I'm not sure if I totally understand... I'm trying.  Perhaps you want your
> >>>      
> >>>
> >>FreeBSD machine to be a bridge, not a gateway?
> >>    
> >>
> >>>On Tue, 08 Oct 2002 17:02:37 -0400
> >>>Steven King <cking@blessed.net> wrote:
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>>>I need help trying to get my FreeBSD machine dual-homed. I will try to 
> >>>>explain the situation as best as possible..
> >>>>
> >>>>Interface1 -> hub1 -> Cable Modem (DHCP) -> Internet
> >>>>Interface2 -> hub2 -> Router -> Frame Relay -> Internet
> >>>>
> >>>>I am trying to use Interface1 for cvsup's and things like that (frame is 
> >>>>only 56k) . I have to use Interface2 for web server, mail and dns..
> >>>>
> >>>>When I set up /etc/rc.conf this way it loads up the interfaces no 
> >>>>problem and the cable modem interface works fine but on the interface2 
> >>>>side I cannot get to the internet nor can anyone get to it from that 
> >>>>side. I can ping the boxes on the local subnet but thats it.
> >>>>
> >>>>        
> >>>>
> >>>>from rc.conf:
> >>>      
> >>>
> >>>>network_interfaces="rl0 de0 lo0"
> >>>>defaultrouter="NO"
> >>>>ifconfig_rl0="DHCP"
> >>>>ifconfig_de0="inet <interface2 IP> netmask 255.255.255.0"
> >>>>
> >>>>I cannot figure out what else is needed to fix this.. I have tried 
> >>>>static_routes, gateway_enable, forward_sourceroute in rc.conf and 
> >>>>net.inet.ip.forwarding=1 in sysctl.conf.. I have tried several different 
> >>>>netmasks for interface2 thinking that was the problem but that dont do 
> >>>>anything.. messed with defaultrouter and everything I can think of.. All 
> >>>>of the examples I have seen on the web and searching through the mailing 
> >>>>list are of using the FBSD box as a gateway for an internal network to 
> >>>>go out through the FBSD box onto the internet.
> >>>>
> >>>>Any help would be appreciated..
> >>>>
> >>>>Thank you
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>To Unsubscribe: send mail to majordomo@FreeBSD.org
> >>>>with "unsubscribe freebsd-questions" in the body of the message
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>To Unsubscribe: send mail to majordomo@FreeBSD.org
> >>>with "unsubscribe freebsd-questions" in the body of the message
> >>>
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>
> >>
> >>    
> >>
> >
> >
> >
> >
> >
> >
> >  
> >
> 
> 
> 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021009122955.4f3d98c6.james>