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 mydomain.org.

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):

#rc.conf
#
defaultrouter "68.208.213.123"
ifconfig_de0="inet 68.208.213.123 netmask 255.255.255.0"
ifconfig_de1="inet 10.10.10.45 netmask 255.255.0.0"

my ISP runs nameservers which point the outside world to mydomain.org 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
hello,

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

try netstat -rn to see the route for the BSD

cheers
# 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)

cheersSmilie
# 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 68.208.213.123
it should have been 68.208.213.1

Routing tables

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

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

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

it's as if the router (10.10.10.1) 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 192.168.1.10/24 GW 192.168.1.1 eth1 192.168.2.10/24 GW 192.168.2.1 Third PC is located in 192.168.13.0/24 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 192.168.1.100 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 10.10.10.1 NIC2 10.10.10.2 VIP 192.168.10.1 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 (10.2.0.2) 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