In short: natd appears to be working - or so it says - but something seems to be bogging it.
The setup is rather simple:
External device is nfe0. Internal device ue0. External device is connected to our building's internet provider, which gives out a 10.84.0.0/16 address. Internal device is 10.10.10.1 and is connected to a access point. isc-dhcpd is set up to give out 10.10.10.0/24-addresses on the internal network.
ICMP is getting through and works. From machines on the internal network I appear to be able to ping any address on the internet (I usually try with 8.8.8.8 but others also works). TCP and UDP services (DNS, http, SMTP, etc.) is not working.
Starting natd from console (
However - clients does not appear to be able to even do the name resolution
My rc.conf
My natd.conf:
My ipfw.rules is shaved down to an absolute minimum:
And
I've been trying all sorts of things, but the outcome always seems to be the same: ICMP gets through - nothing else, so now I'm thinking that I may be missing out the obvious. Any pointers would be greatly appreciated.
The setup is rather simple:
External device is nfe0. Internal device ue0. External device is connected to our building's internet provider, which gives out a 10.84.0.0/16 address. Internal device is 10.10.10.1 and is connected to a access point. isc-dhcpd is set up to give out 10.10.10.0/24-addresses on the internal network.
ICMP is getting through and works. From machines on the internal network I appear to be able to ping any address on the internet (I usually try with 8.8.8.8 but others also works). TCP and UDP services (DNS, http, SMTP, etc.) is not working.
Starting natd from console (
/sbin/natd -dynamic -l -s -v -interface nfe0) gives a lot of data such as:
Code:
In {default}[UDP] [UDP] 17.173.254.222:16384 -> 10.84.168.67:16403 aliased to
[UDP] 17.173.254.222:16384 -> 10.10.10.12:16403
In {default}[UDP] [UDP] 17.173.254.222:16385 -> 10.84.168.67:16403 aliased to
[UDP] 17.173.254.222:16385 -> 10.10.10.12:16403
In {default}[UDP] [UDP] 17.173.254.223:16386 -> 10.84.168.67:16403 aliased to
[UDP] 17.173.254.223:16386 -> 10.10.10.12:16403
Out {default}[UDP] [UDP] 10.10.10.12:16403 -> 17.173.254.222:16384 aliased to
[UDP] 10.84.168.67:16403 -> 17.173.254.222:16384
Out {default}[UDP] [UDP] 10.10.10.12:16403 -> 17.173.254.222:16385 aliased to
[UDP] 10.84.168.67:16403 -> 17.173.254.222:16385
Out {default}[UDP] [UDP] 10.10.10.12:16403 -> 17.173.254.223:16386 aliased to
[UDP] 10.84.168.67:16403 -> 17.173.254.223:16386
In {default}[UDP] [UDP] 17.173.254.222:16384 -> 10.84.168.67:16403 aliased to
[UDP] 17.173.254.222:16384 -> 10.10.10.12:16403
In {default}[UDP] [UDP] 17.173.254.222:16385 -> 10.84.168.67:16403 aliased to
[UDP] 17.173.254.222:16385 -> 10.10.10.12:16403
In {default}[UDP] [UDP] 17.173.254.223:16386 -> 10.84.168.67:16403 aliased to
[UDP] 17.173.254.223:16386 -> 10.10.10.12:16403
Out {default}[UDP] [UDP] 10.10.10.12:61250 -> 185.37.37.37:53 aliased to
[UDP] 10.84.168.67:61250 -> 185.37.37.37:53
In {default}[UDP] [UDP] 185.37.37.37:53 -> 10.84.168.67:61250 aliased to
[UDP] 185.37.37.37:53 -> 10.10.10.12:61250
Out {default}[UDP] [UDP] 10.10.10.12:16403 -> 17.173.254.222:16384 aliased to
[UDP] 10.84.168.67:16403 -> 17.173.254.222:16384
Out {default}[UDP] [UDP] 10.10.10.12:16403 -> 17.173.254.222:16385 aliased to
However - clients does not appear to be able to even do the name resolution
My rc.conf
Code:
hostname="trygvelie.dyndns.dk"
keymap="danish.iso.kbd"
sshd_enable="YES"
powerd_enable="YES"
dumpdev="AUTO"
# network if
ifconfig_nfe0="DHCP"
ifconfig_ue0="inet 10.10.10.1 netmask 255.255.255.0"
# gateway
gateway_enable="YES"
natd_enable="YES"
natd_interface="nfe0"
natd_flags="-f /etc/natd.conf"
dhcpd_enable="YES"
# firewall
firewall_enable="YES"
firewall_type="open"
firewall_script="/etc/ipfw.rules"
firewall_logging="YES"
My natd.conf:
Code:
use_sockets
same_ports
interface nfe0
dynamic
unregistered_only
My ipfw.rules is shaved down to an absolute minimum:
Code:
#!/bin/sh
cmd="/sbin/ipfw -q add"
/sbin/ipfw -q -f flush
$cmd 500 divert 8668 all from any to any via nfe0
$cmd 1000 allow ip from any to any via lo0
$cmd 65000 allow ip from any to any
kldstat gives me:
Code:
Id Refs Address Size Name
1 30 0xffffffff80200000 15f0310 kernel
2 1 0xffffffff81a12000 59ec if_axe.ko
3 1 0xffffffff81a18000 2aa8 uether.ko
4 1 0xffffffff81a1b000 4e18 ng_ubt.ko
5 5 0xffffffff81a20000 affe netgraph.ko
6 1 0xffffffff81a2b000 9143 ng_hci.ko
7 3 0xffffffff81a35000 102b ng_bluetooth.ko
8 1 0xffffffff81a37000 be53 ng_l2cap.ko
9 1 0xffffffff81a43000 19d55 ng_btsocket.ko
10 1 0xffffffff81a5d000 37c7 ng_socket.ko
11 2 0xffffffff81a61000 109bd ipfw.ko
12 1 0xffffffff81a72000 4c16 ipdivert.ko
And
uname -a gives:
Code:
FreeBSD trygvelie.dyndns.dk 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
I've been trying all sorts of things, but the outcome always seems to be the same: ICMP gets through - nothing else, so now I'm thinking that I may be missing out the obvious. Any pointers would be greatly appreciated.