many PC ---(wifi)--->rum0:raspberry:smsc0---(wired LAN)--->internet

# ./comment-out.bat /etc/hostname.smsc0
dhcp




# ./comment-out.bat /etc/hostname.rum0
awk: can't open file /etc/hostname.rum0
 source line number 1



# ./comment-out.bat /etc/rc.conf.local

dhcpd_flags=
pf=YES                  # Packet filter / NAT


# ./comment-out.bat /etc/sysctl.conf

net.inet.ip.forwarding=1



#/comment-out.bat /etc/dhcpd.interfaces
   <
rum0



# ./comment-out.bat /etc/dhcpd.conf

option  domain-name-servers 8.8.8.8;
subnet 192.168.120.0 netmask 255.255.255.0 {
        option routers 192.168.120.1;
        range 192.168.120.11 192.168.120.15;
}



# ./comment-out.bat /etc/pf.conf

ext=smsc0
icmp_types = "{echoreq, unreach}"
set block-policy return
set loginterface $ext
set skip on lo0
match in all scrub (no-df max-mss 1440)
match out on $ext inet from !($ext:network) to any nat-to ($ext:0)
block log all
pass out quick
pass in quick inet proto { tcp udp gre } from any to any
pass in quick inet proto icmp all icmp-type $icmp_types keep state



# ./comment-out.bat wifi-AP.bat

sh /etc/netstart
pfctl -f /etc/pf.conf

pfctl -sr
ifconfig rum0 inet 192.168.120.1 netmask 255.255.255.0 \
media autoselect mediaopt hostap nwid openbsdAP  wpakey 1234567890 \
chan 1 up
/etc/rc.d/dhcpd  restart

Reply via email to