+-----------------------+
| FreeBSD Box |
| |
| NIC 1 NIC 2 |
| +---+ +---+ |
| |xl0| |xl1| |
+--/ \---------/ \--+
^ v
+---------+ | | +--------+
--> |DSL/CABLE| ---------+ | +--------| Host A |
| modem | | | +--------+
+---------+ | |
+-----+ |
+----------------------------+ | | | +--------+
| NIC 1 (xl0) - 4.33.192.69 | | | | +----| Host B |
| NIC 2 (xl1) - 192.168.1.1 | | =-----+ | +--------+
+----------------------------+ | HUB | |
| Host A - 192.168.1.10 | | =---------+
| Host B - 192.168.1.20 | | | +--------+
| Host C - 192.168.1.30 | | =--------------| Host C +
+----------------------------+ | | +--------+
+-----+
|
10.0.0.0/8 172.16.0.0/12 |
options IPFILTER #kernel ipfilter support(WHAT!? You don't know how to compile a kernel? Okay, go here.)
gateway_enable="YES"
map xl0 192.168.5.0/24 -> 4.33.192.69/32 portmap tcp/udp 10000:60000 map xl0 192.168.5.0/24 -> 4.33.192.69/32 |
#!/bin/sh /sbin/ifconfig xl1 down /sbin/ifconfig xl1 inet 192.168.5.1 netmask 0xffffff00 broadcast 192.168.5.255 /sbin/ifconfig xl1 up [ -x /sbin/ipnat ] && /sbin/ipnat -CF -f /etc/ipnat.conf && ipf -y && echo -n 'ipnat' |
xl0: flags=8843 |
IP: 192.168.5.x where 254>x>1 GATEWAY: 192.168.5.1 DNS: Should be offered by your ISP. |