Sorry if it's poor form to dig up an old post, but this was one of my first big stumps when I was trying to tune my original networking configuration. I pretty much got the same response as to my attempts to static a wireless connection as "why". To me, you don't want to static everything obviously, as wireless and DHCP do go hand-in-hand with the convenience of the devices, and there is little to no security increase in staticing the connection. However, after getting more advanced in my usage of FreeBSD networking, by installing samba server using version samba44 and the latest FreeBSD 10.3 version, I keep coming back to why I was never able to get my main wireless device to work as static.
It's pretty complicated for me now, as what I've done as the sensible workaround to staticing the IP using the OS, is to set up my networking hardware to use a static DHCP configuration.
And the reason you would want to static, and I still would like to static the OS, is that as my configuration in FreeBSD becomes more complicated, for example, using the packet filter starting with a block all rule, setting a Samba server up that needs to know right from boot what IP to use, PF rules need to go through as smoothly and quickly as possible, etc - is that the OS knows right from the get-go what IP to grab, and doesn't get it confused with other devices, nor does it take any time to try to acquire a lease, making everything work more smoothly.
So I feel like I'm passing the buck to my networking hardware to do what the OS should simply do, but I have never gotten any of these supposed static wireless configurations to work. I mean, look at my rc.conf now, I can easily post it because I just dropped it on my workstation I'm typing on because I can do that now having figured out samba, even with the added complexity PF "block all" configurations add, forcing you to define every little way out and in of your network by hand, etc -
/etc/rc.conf:
Code:
hostname="localhost"
#ifconfig_re0="inet 192.168.8.1 netmask 255.255.255.240"
#defaultrouter="192.168.8.1"
local_unbound_enable="YES"
moused_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
hald_enable="YES"
dbus_enable="YES"
ifconfig_re0="up"
wlans_ath0="wlan0"
ifconfig_ath0="ether mac address"
ifconfig_wlan0="WPA"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto failover laggport re0 laggport wlan0 DHCP"
samba_server_enable="YES"
pf_enable="YES"
pflog_enable="YES"
fusefs_enable="YES"
#devfs_system_ruleset="system"
And here's me experimenting with PF, still able to go from a host to a router to a firewall then to my workstation, but still can't understand where I would go from here to get static IP working on wireless, but I must be doing something right if I am able to share my files with windows across all that network topology:
/etc/pf.conf
Code:
block log all
table <local> { 192.168.0.0/28 }
pass in log quick from <local> to any keep state
tcp_pass = "{ 25 80 123 137 138 445}"
udp_pass = "{ 53 137 138}"
pass out log on lagg0 proto tcp to any port $tcp_pass keep state
pass out log on lagg0 proto udp to any port $udp_pass keep state
I'm able to browse the internet, drop files to my windows machine, and view PF in action with
tcpdump -n -e -ttt -i pflog0
, see all the stuff that I didn't specificially allow in or out simply bounce off, or what happens to the packets(part of why I'm posting this is because PF is perhaps the single most beautiful piece of open source software I've come across, coming from linux crap like iptables, being a network geek, I am amazed by PF).
And I might as well also show you the samba config I cooked up myself with a lot of googling. All this is very makeshift, but I can put files on my windows machine across 2 firewalls, and windows can't make any changes to the FreeBSD machine(I guess I actually have what would be called a server now?), and even see the connections open and the pings bounce off with
pftop
.
/user/local/smb4.conf
Code:
[global]
domain master = yes
local master = yes
preferred master = yes
workgroup = WORKGROUP
server string = "Server"
#netbios name = Winix
#wins support = yes
hosts allow = 192.168.0.
security = user
passdb backend = tdbsam
[BSD]
path = /home/user/Downloads
valid users = user
writable = no
browsable = yes
read only = yes
guest ok = no
public = no
create mask = 0665
directory mask = 0755
So, I've managed to do all this, but things would be running quite a bit smoother if I could just get the FreeBSD machine to choose the IP address instead of forcing my router to look for its MAC address to assign one statically.
This isn't meant as a complaint, and I am truly thankful for all the help I've received along the way here, and with what I've been able to accomplish with FreeBSD ensures I will never use any linux distribution again. The developers under the BSD license sure have their stuff together in comparison to a lot of the linux distro's out there.
So this is truely my "Boggle", as my name would imply, as happy as I am with everything, I would just like to see how I would get a static IP working from here, especially after all I've accomplished on my own. But don't get me wrong, the boggle I have for BSD is truly that of how well and consistently designed it is. I understand if you don't want to help, but just consider this a thanks and a sign of gratitude for all the people on these forums and the friends I've met along the way who have helped me get started in the land of true UNIX.