Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Jul 2002 13:11:31 -0500
From:      Steve Fettig <lists@stevenfettig.com>
To:        freebsd-questions@freebsd.org
Subject:   Dual Homed Host Problems - Wifi to Wired - Cannot get through the outside interface
Message-ID:  <3D209B53.9050501@stevenfettig.com>

next in thread | raw e-mail | index | archive | help
I have been banging my head against this problem now for two days and 
don't know what in the world is wrong.  I have a Thinkpad that I am 
trying to turn into an wireless Access Point for testing purposes.  I 
have a Orinoco Gold wifi pc card and a 3Com Etherlink III (3C589C) pc 
card all set up under FreeBSD 4.6.  I have the following options enabled 
in my custom kernel:

options 
IPFIREWALL
options 
IPDIVERT
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT="250"
options TCP_DROP_SYNFIN
options ICMP_BANDLIM

my rc.conf is:

<--begin rc.conf-->
# -- sysinstall generated deltas -- # Thu Jun 27 15:53:52 2002
# Created: Thu Jun 27 15:53:52 2002
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
apm_enable="YES"
font8x14="NO"
font8x16="swiss-8x16"
font8x8="swiss-8x8"

# Network Settings Go Here:
# The settings to control the wifi adapter are in 
/usr/local/sbin/wireless.sh
# and the setup of those settings are controled in /etc/pccard.conf
hostname="rdtp.licentia.net"
gateway_enable="YES"
pccard_enable="YES"

# Firewall Configuration Settings:
firewall_enable="YES"
firewall_script="/etc/rc.ipfw_custom"
firewall_quiet="NO"

# NAT Configuration Settings:
natd_enable="YES"
natd_flags="-f /etc/natd.conf"
natd_interface="ep0"
#tcp_drop_synfin="YES"

linux_enable="YES"
moused_enable="YES"
nfs_reserved_port_only="YES"
scrnmap="NO"
sendmail_enable="YES"
sshd_enable="YES"
usbd_enable="YES"
<--end rc.conf-->

I have tacked my rc.ipfw_custom onto the email below.

I get the wifi card running (along with the wired 3Com) and can see it 
using another wifi enabled laptop and ping between the two.  The 
ifconfig looks like:

<--begin ifconfig-->
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	inet6 ::1 prefixlen 128
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
	inet 127.0.0.1 netmask 0xff000000
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500
wi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 10.6.19.1 netmask 0xffffff00 broadcast 10.6.19.255
	inet6 fe80::202:2dff:fe2e:a742%wi0 prefixlen 64 scopeid 0x5
	ether 00:02:2d:2e:a7:42
	media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps)
	status: no carrier
	ssid licentiaRD2 1:licentiaRD2
	stationname licentiaRD_core1
	channel 7 authmode OPEN powersavemode OFF powersavesleep 100
	wepmode OFF weptxkey 1
ep0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 192.168.20.23 netmask 0xffffff00 broadcast 192.168.20.255
	inet6 fe80::2a0:24ff:feab:11a4%ep0 prefixlen 64 scopeid 0x6
	ether 00:a0:24:ab:11:a4
	media: Ethernet 10baseT/UTP
<--end ifconfig-->

and netstat -rn
Routing tables

<--begin netstat -rn-->
Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
10.6.19/24         link#5             UC          1        0    wi0
10.6.19.20         00:30:65:1e:10:85  UHLW        2      444    wi0  820
127.0.0.1          127.0.0.1          UH          0        0    lo0
192.168.20         link#6             UC          0        0    ep0
<--end netstat -rn-->

ipv6 was cut because wrapping didn't work to well and I didn't think it 
was necessary

The inside interface is:
10.6.19.1/255.255.255.0

The outside interface is: (yes, it is going through another NAT box, but 
this is only during the test phase -- plus, it doesn't matter whether I 
try with a private address or actually stick this on the net with a 
public address)
192.168.20.23/255.255.255.224

BUT, here is the problem, I cannot ping 192.168.20.1 (the gateway to the 
net) nor any other device on the 192.168.20 network - thus, I can't get 
anything out.  I can ping the interface itself (i.e. .23), but when I 
try anything else it simply sits there and responds that 100% of the 
packets were lost.  There is no visible link activity - as if no packets 
understand that they must go out that interface.  The firewall is not 
blocking this because it does not show PERMISSION DENIED or anything 
like that and plus, I am logging everthing possible and nothing shows up 
in the logs.  I have tried adding a default route with:
route add default 192.168.20.1
but that doesn't do a thing.  Beyond just pinging, nothing else gets 
sent out the interface ep0 regardless of whether you are trying from a 
machine on the internal network or the console itself.  Does anyone have 
a clue as to what the heck I am doing wrong???

I would really appreciate the help!
Steve


btw, I have the anti-spoofing stuff turned "off" for now so that I could 
make sure that it was not preventing me from pinging outside workstations
<--begin rc.ipfw_custom-->
# rc.ipfw - Firewall Rules
#
# This file is a modified version of /etc/rc.firewall.
#
# Copied from D. O'Connor and modified by: Steve Fettig
# Modified:       6/30/2002
#
#

# Suck in the configuration variables.
if [ -r /etc/defaults/rc.conf ]; then
         . /etc/defaults/rc.conf
         source_rc_confs
elif [ -r /etc/rc.conf ]; then
         . /etc/rc.conf
fi

if [ -n "${1}" ]; then
         firewall_type="${1}"
fi

# Firewall program
fwcmd="/sbin/ipfw"

# Outside interface network and netmask and ip
oif="ep0"
onet="192.168.20.0"
omask="255.255.255.224"
oip="192.168.20.23"

# Inside interface network and netmask and ip
iif="wi0"
inet="10.6.19.0"
imask="255.255.255.0"
iip="10.6.19.1"

# My ISP's DNS servers
dns1="192.168.20.1"
dns2="24.159.224.10"

# Flush previous rules
${fwcmd} -f flush

# Allow loopbacks, deny imposters
${fwcmd} add 100 pass log all from any to any via lo0
${fwcmd} add 200 deny log all from any to 127.0.0.0/8

# If you're using 'options BRIDGE', uncomment the following line to pass ARP
#${fwcmd} add 300 pass udp from 0.0.0.0 2054 to 0.0.0.0

# Stop spoofing
#${fwcmd} add deny all from ${inet}:${imask} to any in via ${oif}
#${fwcmd} add deny all from ${onet}:${omask} to any in via ${iif}

# Stop RFC1918 nets on the outside interface
#${fwcmd} add deny all from any to 10.0.0.0/8 via ${oif}
#${fwcmd} add deny all from any to 172.16.0.0/12 via ${oif}
#${fwcmd} add deny all from any to 192.168.0.0/16 via ${oif}

# Stop draft-manning-dsua-03.txt (1 May 2000) nets (includes RESERVED-1,
# DHCP auto-configuration, NET-TEST, MULTICAST (class D), and class E)
# on the outside interface
#${fwcmd} add deny all from any to 0.0.0.0/8 via ${oif}
#${fwcmd} add deny all from any to 169.254.0.0/16 via ${oif}
#${fwcmd} add deny all from any to 192.0.2.0/24 via ${oif}
#${fwcmd} add deny all from any to 224.0.0.0/4 via ${oif}
#${fwcmd} add deny all from any to 240.0.0.0/4 via ${oif}

# Network Address Translation.  This rule is placed here deliberately
# so that it does not interfere with the surrounding address-checking
# rules.  If for example one of your internal LAN machines had its IP
# address set to 192.0.2.1 then an incoming packet for it after being
# translated by natd(8) would match the `deny' rule above.  Similarly
# an outgoing packet originated from it before being translated would
# match the `deny' rule below.
${fwcmd} add divert natd all from any to any via ${natd_interface}

# Stop RFC1918 nets on the outside interface
#${fwcmd} add deny all from 10.0.0.0/8 to any via ${oif}
#${fwcmd} add deny all from 172.16.0.0/12 to any via ${oif}
#${fwcmd} add deny all from 192.168.0.0/16 to any via ${oif}

# Stop draft-manning-dsua-03.txt (1 May 2000) nets (includes RESERVED-1,
# DHCP auto-configuration, NET-TEST, MULTICAST (class D), and class E)
# on the outside interface
#${fwcmd} add deny all from 0.0.0.0/8 to any via ${oif}
#${fwcmd} add deny all from 169.254.0.0/16 to any via ${oif}
#${fwcmd} add deny all from 192.0.2.0/24 to any via ${oif}
#${fwcmd} add deny all from 224.0.0.0/4 to any via ${oif}
#${fwcmd} add deny all from 240.0.0.0/4 to any via ${oif}

# Allow established connections with minimal overhead
${fwcmd} add pass log tcp from any to any established

# Allow IP fragments to pass through
${fwcmd} add pass log all from any to any frag


### TCP RULES

# HTTP - Allow access to our web server
${fwcmd} add pass tcp from any to any 80 setup

# SMTP - Allow access to sendmail for incoming e-mail
${fwcmd} add pass tcp from any to any 25 setup

# FTP - Allow incoming data channel for outgoing connections,
# reject & log all incoming control connections
${fwcmd} add pass tcp from any 20 to any 1024-65535 setup
${fwcmd} add deny log tcp from any to any 21 in via ${oif} setup

# SSH Login - Allow & Log all incoming
${fwcmd} add pass log tcp from any to any 22 in via ${oif} setup

# IDENT - Reset incoming connections
${fwcmd} add reset log tcp from any to any 113 in via ${oif} setup

# Reject&Log all setup of incoming connections from the outside
${fwcmd} add deny log tcp from any to any in via ${oif} setup

# Allow setup of any other TCP connection
${fwcmd} add pass log tcp from any to any setup


### UDP RULES

# DNS - Allow queries out in the world
${fwcmd} add pass udp from any to ${dns1} 53
${fwcmd} add pass udp from any to ${dns2} 53
${fwcmd} add pass udp from ${dns1} 53 to any
${fwcmd} add pass udp from ${dns2} 53 to any

# SMB - Allow local traffic
${fwcmd} add pass log udp from any to any 137-139 via ${iif}

# SYSLOG - Allow machines on inside net to log to us.
${fwcmd} add pass log udp from any to any 514 via ${iif}

# NTP - Allow queries out in the world
${fwcmd} add pass udp from any 123 to any 123 via ${oif}
${fwcmd} add pass udp from any 123 to any via ${iif}
${fwcmd} add pass udp from any to any 123 via ${iif}

# TRACEROUTE - Allow outgoing
${fwcmd} add pass log udp from any to any 33434-33523 out via ${oif}


### ICMP RULES

# ICMP packets
# Allow all ICMP packets on internal interface
${fwcmd} add pass log icmp from any to any via ${iif}

# Allow outgoing pings
${fwcmd} add pass log icmp from any to any icmptypes 8 out via ${oif}
${fwcmd} add pass log icmp from any to any icmptypes 0 in via ${oif}

# Allow Destination Unreachable, Source Quench, Time Exceeded, and Bad 
Header
${fwcmd} add pass log icmp from any to any icmptypes 3,4,11,12 via ${oif}

# Deny the rest of them
${fwcmd} add deny log icmp from any to any


### MISCELLANEOUS REJECT RULES

# Reject broadcasts from outside interface
${fwcmd} add 63000 deny log ip from any to 0.0.0.255:0.0.0.255 in via ${oif}

# Reject&Log SMB connections on outside interface
${fwcmd} add 64000 deny log udp from any to any 137-139 via ${oif}

# Reject&Log all other connections from outside interface
${fwcmd} add 65000 deny log ip from any to any via ${oif}

# Everything else is denied by default, unless the
# IPFIREWALL_DEFAULT_TO_ACCEPT option is set in your kernel
# config file.
<--end rc.ipfw_custom-->


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?3D209B53.9050501>