View Single Post
  #4   (View Single Post)  
Old 4th July 2014
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Your /etc/hostname.athn0 file should have a static address. It is a DHCP server for a subnet; that subnet should be known to you.

Your /etc/dhcpd.conf configuration must describe that same subnet, and have a range of dynamic addresses. It can also provide additional information such as routers and domain name server addresses.

Picture, if you will, this network. It is attached to the Internet at some Internet address a.b.c.d. The GATEWAY device, OpenBSD, needs to have two NICs: a connection to the Internet, and a connection to a private network, containing addresses which are not permitted on the Internet itself, such as any address beginning with 192.168.*.* or 10.*. There are others. Google for RFC 1918.
Code:
{Internet} --- a.b.c.d [GATEWAY] 10.0.0.1 -- {Private Network}
Your Gateway needs to have two NICs: the athn0 NIC, and at least one additional NIC.

IPv4 forwarding must be enabled in /etc/sysctl.conf.

Network Address Translation must be used in PF, so that any communication from one of the devices on the 10.0.0.0/24 network destined for the Internet gets translated to a.b.c.d. (e.g., "match out on $external_nic from !($external_nic) nat-to ($external_nic)")

The dhcpd.conf file must define the 10.0.0.0/24 subnet ("subnet 10.0.0.0 netmask 255.255.255.0;"). A range within that subnet must be defined for dynamic address assignments ("range 10.0.0.10 10.0.0.100;"). If you want devices on that private network to reach the Internet, the configuration must also define 10.0.0.1 as a router ("option routers 10.0.0.1;"), and you will likely want to point them to a DNS server ("option domain-name-servers 4.4.4.4 8.8.8.8;").

---

I hope this helps.
Reply With Quote