Hello, I have problem ;P
please help:
PF + NAT + LAN(WINDOWS OS)
rc.conf:
dhcpd.conf
pf.conf
sysctl.conf
Windows: (LAN)
And there is no Internet in LAN... And I do not know why?
Please help.
please help:
PF + NAT + LAN(WINDOWS OS)
rc.conf:
Code:
#ethernet
ifconfig_rl0="inet WAN netmask 255.255.255.248"
ifconfig_rl1="inet 192.168.20.1 netmask 255.255.255.0"
dhcpd_enable="YES"
dhcpd_flags="-q" # command option(s)
dhcpd_conf="/usr/local/etc/dhcpd.conf" # configuration file
dhcpd_ifaces="rl1" # ethernet interface(s)
dhcpd_withumask="022" # file creation mask
defaultrouter="WAN"
hostname="domena.pl"
gateway_enable="YES"
#PF
pf_enable="YES" # Enable PF (load module if required)
pf_rules="/etc/pf.conf" # rules definition file for pf
pf_flags="" # additional flags for pfctl startup
pflog_enable="YES" # start pflogd(8)
pflog_logfile="/var/log/pflog" # where pflogd should store the logfile
pflog_flags=""
#gateway_enable="YES"
ipnat_enable="YES"
ipnat_program="/sbin/ipnat"
ipnat_rules="/etc/ipnat.rules"
ipnat_flags=""
dhcpd.conf
Code:
option domain-name "domena.pl";
option domain-name-servers 194.204.152.34, 194.204.159.1, 192.168.20.1;
default-lease-time 86400;
max-lease-time 86400;
ddns-update-style none;
authoritative;
log-facility local7;
subnet 192.168.20.0 netmask 255.255.255.0 {
range 192.168.20.240 192.168.20.254;
option routers 192.168.20.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 194.204.152.34, 194.204.159.1, 192.168.20.1;
option broadcast-address 192.168.20.255;
default-lease-time 86400;
max-lease-time 86400;
}
pf.conf
Code:
ext_if = "rl0"
ext_if2 = "rl1"
int_if="rl1"
int_ip="192.168.20.1"
int_net="{ 192.168.20.0/24 }"
# table containing all IP addresses assigned to the firewall
table <firewall> const { self }
#nat
rdr on $int_if proto { tcp udp } from any to { 194.204.152.34, 194.204.159.1, 192.168.20.1 } port 53 -> 127.0.0.1
nat on $ext_if from $int_net to any -> $ext_if
sysctl.conf
Code:
net.inet.ip.forwarding=1
Windows: (LAN)
Code:
cmd>ipconfig /renew
ipconfig /all
IP: 192.168.20.242
GATEWAY: 192.168.20.1
NETMASK: 255.255.255.0
DNS: 192.168.20.1
194.204.152.34
194.204.159.1
Server DHCP: 192.168.20.1
WINS: 192.168.20.1
Please help.