Ядро:
Код: Выделить всё
#FIREWALL
options IPFIREWALL
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=100
options IPFIREWALL_FORWARD
options IPDIVERT
options DUMMYNET
options IPFIREWALL_NAT
options IPFILTER
options LIBALIAS
#NETGRAPH
options NETGRAPH
options NETGRAPH_ETHER
options NETGRAPH_SOCKET
options NETGRAPH_TEE
options NETGRAPH_MPPC_ENCRYPTION
options NETGRAPH_MPPC_COMPRESSION
options NETGRAPH_BPF
options NETGRAPH_IFACE
options NETGRAPH_KSOCKET
options NETGRAPH_PPP
options NETGRAPH_PPTPGRE
options NETGRAPH_TCPMSS
options NETGRAPH_VJC
options NETGRAPH_ONE2MANY
options NETGRAPH_RFC1490
options NETGRAPH_TEE
options NETGRAPH_TTY
options NETGRAPH_UI
##############################
RC.CONF
defaultrouter="192.168.1.1"
hostname="local"
ifconfig_re0="inet 192.168.1.90 netmask 255.255.255.0"
keymap="ru.koi8-r"
sshd_enable="YES"
mysql_enable="YES"
apache22_enable="YES"
mpd_enable="YES"
mpd_flags="-b"
gateway_enable="YES"
firewall_enable="YES"
firewall_logging="YES"
firewall_script="/etc/my.firewall"
natd_enable="YES"
natd_interface="re0"
natd_flags="-f /etc/my.nat"
##############################
MY.FIREWALL
#!/bin/sh
FwCMD="/sbin/ipfw"
Lan="re0"
Ipin="192.168.1.90"
${FwCMD} -f flush # Flushes all the rules
${FwCMD} -f pipe flush # Reset all pipe
${FwCMD} -f queue flush # Reset queue
${FwCMD} add allow ip from any to any via lo0
${FwCMD} add allow tcp from any to any established
${FwCMD} add allow tcp from any to me 1723
${FwCMD} add allow gre from any to any
${FwCMD} nat 123 config ip ${Ipin}
${FwCMD} add nat 123 ip from any to any via ${Lan}
${FwCMD} add allow tcp from any to ${Ipin} 22 in via ${Lan} setup # Permit SSH
${FwCMD} add allow tcp from any to ${Ipin} 80 in via ${Lan} setup # Permit HTTP
${FwCMD} add allow tcp from any to ${Ipin} 443 in via ${Lan} setup # Permit HTTPS
${FwCMD} add allow icmp from any to any icmptypes 0,8,11 # Permit ICMP
${FwCMD} add deny ip from any to any
MY.NAT
map re0 192.168.0.10/24 -> 192.168.1.90
помогите салаге в настройке чертёнка.
