FreeBSD and two NICs

Thread Tools Search this Thread
Special Forums IP Networking FreeBSD and two NICs
# 1  
Old 10-24-2006
FreeBSD and two NICs

FreeBSD 4.8, Apache 1.3.27 - two NICs, one with a real-world IP plugged into a switch outside the PIX firewall, the other with a private IP plugged into a switch inside the PIX firewall. Apache listens on both IPs. my domain is

so in /etc/rc.conf i have something like this (these real-world IPs are not really real, just a spammer's IP borrowed for illustration):

defaultrouter ""
ifconfig_de0="inet netmask"
ifconfig_de1="inet netmask"

my ISP runs nameservers which point the outside world to at the real-world IP. i run a local nameserver which points users inside our firewall to the private IP. works great....on my LAN. outside my LAN (still behind the PIX) the users can't see/ping the private address.

question: is there a way to specify a different default gateway for each of the NICs? i did not see anything which would allow that in the man pages for ifconfig(8) or rc.conf(5).
# 2  
Old 10-27-2006

which side of the bsd router your LAN cant see?
RTO or unreachable?

try netstat -rn to see the route for the BSD

# 3  
Old 10-27-2006
It's not my LAN that can't see something. It's the LANs connected to me that can't see the BSD machine at the private address. I'm connected to these other LANs via older Cisco routers talking over T1s. Our ISP's Cisco guy said that the problem was probably the default gateway for the BSD machine at the private address. In rc.conf, sure enough, I don't have a default gateway for the machine's "inside-the-firewall" NIC. I only have a default gateway for the "outside-the-firewall" NIC. How do I set two default gateways, one for each address class I'm using?
# 4  
Old 10-27-2006
yes - i know that not your internal LAN cant see something,
but your intranet LAN cant see it rightSmilie

post the route with netstat -rn,
yes - you can create as many route as you want with NIC(s)

# 5  
Old 10-30-2006
here's the netstat output. the default routers (ciscos) are in bold.
in my original post i said the gateway for the outside was
it should have been

Routing tables

Destination Gateway Flags Refs Use Netif Expire
default UGSc 36 27262 de0
10.10/16 link#2 UC 4 0 de1 00:e0:b0:63:da:e0 UHLW 0 2 de1 1196 00:04:75:83:e7:8c UHLW 0 1 de1 1046 00:c0:f0:32:02:40 UHLW 0 10 de1 831 00:c0:f0:31:55:b0 UHLW 0 54194 lo0 UH 0 2546 lo0
68.208.0/16 link#1 UC 13 0 de0 00:00:0c:75:dc:91 UHLW 37 0 de0 907 00:04:27:46:43:ea UHLW 0 2074 de0 68 00:04:27:46:43:ea UHLW 0 332 de0 00:04:27:46:43:ea UHLW 2 222693 de0 729 00:00:0c:75:dc:91 UHLW 4 667918 de0 713 00:00:0c:75:dc:91 UHLW 0 7 de0 625 00:00:0c:75:dc:91 UHLW 0 7 de0 792 00:00:0c:75:dc:91 UHLW 0 7 de0 61 00:00:0c:75:dc:91 UHLW 0 7 de0 653 00:00:0c:75:dc:91 UHLW 0 140 de0 912 00:00:0c:75:dc:91 UHLW 0 411 de0 387 00:00:0c:75:dc:91 UHLW 0 146 de0 00:00:0c:75:dc:91 UHLW 0 508 de0 1090
# 6  
Old 10-30-2006

and which LAN cant see your router?
have you try with pings/traceroute?
and what i the output? RTo or net unreachable?

# 7  
Old 10-31-2006
there's several networks connected to mine that can't see the FreeBSD server. for example,,, and others. They RTo on trying to ping the address, the address on the second NIC in the FreeBSD machine. on my network ( i can ping the IP and in fact pull up the webpage from Apache - no problem.

it's as if the router ( isn't picking up the address as being on its network. would that be the case if the NIC doesn't have a default gateway?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Linux with two NICs

Hello All, I have Linux box with two interface cards. Every card has it's own IP Address and Gateway, IP addresses are from different subnets. eth0 GW eth1 GW Third PC is located in network and is trying to access... (2 Replies)
Discussion started by: AndreiM
2 Replies

2. IP Networking

Networking 2 NICs

Hi all, Host - Ubuntu 12.04 desktop 64bit Virtualizer - Oracle VirtualBox 2 NICs Where can I find relevant document to set up 2 NICs, one for inward bound and another for outward bound, separate channel, both connected to the same router Would following document be appropriate for my... (1 Reply)
Discussion started by: satimis
1 Replies

3. Hardware

How to get into BIOS and disable NICS?

Hi, I have to get into BIOS and disable onbaord NICS for an IBM server, can someone please help me out. I tried hitting F1 when reboot to get into BIOS, but it seems like a setup screen and I dont see any option to disable NICS? Thanks Sam (2 Replies)
Discussion started by: sam4919
2 Replies

4. Red Hat

how to combine nics for DM Multipath

I don't undestand how to combine 4 nics in order to use DM Multipath. Do I have to install each nic with its IP address? If yes, do I need a group IP address? This concept is not clear for me. The connection beetwen the server (DELL Poweredge T710) and the SAN through iscsi works well, I used... (1 Reply)
Discussion started by: gnupinux
1 Replies

5. UNIX for Dummies Questions & Answers

multiple NICS in one box

Help, I have a Ubuntu headless server that has 5 NICs in it. The eth0-4 interfaces keep moving from NIC to NIC on boot up. I am told that there is a file that I can edit that will allow me to stabilize this but I need some help in determining the exact file and format for that file. All help will... (0 Replies)
Discussion started by: poundjd
0 Replies

6. Programming

Application crashes in FreeBSD 7.1 while working ok in FreeBSD 6.3

Hello there, My mulithreaded application (which is too large to represent the source code here) is crashing after installing FreeBSD 7.1-RELEASE/amd64. It worked properly on others machines (Dual Cores with 4GB of RAM - FreeBSD 6.2-RELEASE/i386). The current machine has 2x Core 2 Duo... (1 Reply)
Discussion started by: Seenquev
1 Replies

7. IP Networking

Mutiple nics on Freebsd 7.0

I had the pleasure of having a gig nic given to me this week, which also appears on the hardware list of FreeBSD. What I would LIKE to do is: 1). Set my 10/100 nick as the dedicated outside/internet connection with a lan ip of 2). Set the gig nick as the dedicated... (2 Replies)
Discussion started by: droolin
2 Replies

8. Linux

Two NICs one IP address

I'm looking for a way in RHL 5.1 to use two NICs on one host with two physical IP addresses and map them under one virtual IP address, i.e. NIC 1 NIC2 VIP Basically I want either one of the NICs to ARP for the VIP. No load balancing required just HA. (2 Replies)
Discussion started by: wschmied
2 Replies

9. Solaris

How many NICS do I have?

Hi, is there a way in Solaris 8 to determine how many total NIC's say a Sun Sparc box has installed - plumbed or unplumbed - and find out its capable network speeds and MAC address? I know ifconfig -a but that only shows the plumbed and used interfaces. thx cc (2 Replies)
Discussion started by: bigapple100
2 Replies

10. AIX

Merge NICs

Hi friends, I installed oracle 10g ( RAC on 2 IBM p5 570 servers running AIX 5.3ML04 and HACMP5.2 (used Raw devices, not used GPFS). Each server has 4 x 1Gbps ethernet cards (NICs), en0 and en1 for boot address, en2 and en3 for oracle interconnect. Now i want to merge 2 NICs (en2 and... (1 Reply)
Discussion started by: bong02
1 Replies
Login or Register to Ask a Question

Featured Tech Videos