|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Weird NAT issues
I'm having problems with my NAT box. Basically, things work in general, but when visiting a fresh site (from inside the LAN), it usually doesn't get a DNS response right away. In addition, it will occasionally forget the IP at which point it goes back to that. Refreshing after it times out works about 70% of the time, and refreshing after a couple time out periods is almost guaranteed to work. I *think* that while the computer on the LAN side of the NAT gateway is having problems if I open up Lynx on the gateway itself it works, but it could just be a timing thing.
The NAT gateway runs FreeBSD 7. There is one computer on the LAN side, running Windows Server 2008 (as a desktop). The network card facing outside is vr0, the one facing inside is em0. (There is also a ral0 wireless card, but it is unused at the moment.) My "ISP" is actually just another NAT box provided by the apartment; it gives out 192.168 addresses, so to avoid confusion I'm using 10.0 addresses on the LAN. My /etc/rc.conf: Code:
keymap="us.dvorak" ifconfig_vr0="DHCP" hostname="Conrad.gateway.2wire.net" zfs_enable="YES" gateway_enable="YES" ipnat_enable="YES" ipnat_rules="/etc/ipnat.rules" dhcpd_enable="YES" dhcpd_ifaces="em0" samba_enable="YES" maradns_enable="YES" sshd_enable="YES" Code:
map vr0 10.0.0.0/24 -> 0/32 portmap tcp/udp auto map ral0 192.168.128.0/24 -> 0/32 portmap tcp/udp auto I installed the net/isc-dhcp3-server port. /usr/local/etc/dhcpd.conf: Code:
option domain-name "me.org"; option domain-name-servers 192.168.1.254; #10.0.0.1; ** default-lease-time 86400; max-lease-time 604800; ddns-update-style none; subnet 192.168.1.0 netmask 255.255.255.0 { ## this is the external network; vr0has 192.168.1.74 } subnet 10.0.0.0 netmask 255.0.0.0 { range 10.0.0.100 10.0.0.200; option routers 10.0.0.1; } subnet 192.168.128.0 netmask 255.255.255.0 { ## this is what i would be using for the wireless network range 192.168.128.100 192.168.128.200; option routers 192.168.128.1; } Windows picks up the DNS server and gateway fine: Code:
C:\>ipconfig /all ... DHCP Enabled. . . . . . . . . . . : Yes ... IPv4 Address. . . . . . . . . . . : 10.0.0.200(Preferred) Subnet Mask . . . . . . . . . . . : 255.0.0.0 ... Default Gateway . . . . . . . . . : 10.0.0.1 DHCP Server . . . . . . . . . . . : 10.0.0.1 DNS Servers . . . . . . . . . . . : 192.168.1.254 Any idea what's wrong or how to go about debugging this? I had a FreeBSD 6.2 server up for a while and don't remember having problems getting the basics working, but it was with slightly different hardware (processor and motherboard) because I wanted ZFS. |
|
|||
Virtually any. Google, Slashdot, Facebook, Microsoft, Daemonforums, XKCD; pretty much if I've gone to the site more than a time or two, I've seen this issue.
|
|
|||
You could use tcpdump to look at the DNS traffic passing through your FreeBSD box
Code:
# tcpdump -nvv -i vr0 -s512 port domain
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Weird time issues | schrodinger | OpenBSD General | 7 | 26th October 2009 03:20 PM |
Searching and replacing weird patterns on a file. | bigb89 | Programming | 8 | 6th December 2008 06:59 PM |
squid cachemgr.cgi output weird | chavez243 | FreeBSD Ports and Packages | 3 | 25th October 2008 02:58 PM |
Weird network problem | rex | FreeBSD General | 5 | 16th September 2008 02:05 AM |
weird history problem | mmusang | FreeBSD General | 2 | 17th May 2008 07:07 PM |