Hello, iI install FreeBSD 10.2-RELEASE on my Hyper-V and compile kernel with options PF and ALTQ.
PC Windows 7 IP 192.168.2.6, gateway 192.168.2.3 dns 8.8.8.8 not route DNS through FreeBSD 10.2 with PF.
iInstall FreeBSD 10.1 and set up as FreeBSD 10.2 and everything works, what is the problem?
Code:
device pf
device pflog
device pfsync
options ALTQ
options ALTQ_CBQ # Class Bases Queuing (CBQ)
options ALTQ_RED # Random Early Detection (RED)
options ALTQ_RIO # RED In/Out
options ALTQ_HFSC # Hierarchical Packet Scheduler (HFSC)
options ALTQ_PRIQ # Priority Queuing (PRIQ)
options ALTQ_NOPCC # Required for SMP build
Code:
root@FreeBSD:/usr/home/admin # cat /etc/rc.conf
hostname="FreeBSD"
keymap="ru.koi8-r.kbd"
ifconfig_hn0="inet 192.168.100.12 netmask 255.255.255.0"
ifconfig_hn1="inet 192.168.2.3 netmask 255.255.255.0"
defaultrouter="192.168.100.1"
gateway_enable="YES"
sshd_enable="YES"
dumpdev="AUTO"
sendmail_enable="NONE"
pf_enable="YES"
pf_rules="/etc/pf.conf"
pflog_enable="YES"
pflog_logfile="/var/log/pf.log"
pflog_program="/sbin/pflogd"
pflog_flags=""
Code:
root@FreeBSD:/usr/home/admin # cat /etc/pf.conf
ext_if = "hn0"
int_if = "hn1"
lan = "192.168.2.0/24"
set block-policy return
set skip on lo0
scrub in all
nat on $ext_if from $lan to any -> ($ext_if)
antispoof quick for { $int_if $ext_if }
block all
pass out keep state
#ssh
pass in on $int_if proto tcp from any to ($int_if) port 22 keep state
pass in on $ext_if proto tcp from any to ($ext_if) port 22 keep state
#pass in on $int_if from 192.168.2.10 to any keep state
pass in on $int_if from 192.168.2.6 to any keep state
PC Windows 7 IP 192.168.2.6, gateway 192.168.2.3 dns 8.8.8.8 not route DNS through FreeBSD 10.2 with PF.
Last edited by a moderator: