pfsense Googleに長いpingを送る

pfsense Googleに長いpingを送る

pfsenseボックスを設定しました。何が起こったのかは、192.168.3.1ボックス内の管理インターフェイスをクリックできないようにルールを設定したことです。

ルールを有効にした後

--- www.l.google.com ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 5080ms
rtt min/avg/max/mdev = 37.684/37.776/37.869/0.215 ms
root@bad-apple:/etc#

ルールが無効になっています。

--- www.l.google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 42.064/44.104/46.144/2.040 ms

これをもたらす規則を禁止してください。

ID  Proto   Source  Port    Destination     Port    Gateway     Queue   Schedule    Description     

        *   APPLESERVER net     *   192.168.3.1     *           *        none     

サーバーが管理インターフェイスにアクセスしたくないのですが、コンピュータを構成するためにインターネットにアクセスしたいと思います。以前この問題を経験した人はいますか?ターゲットをWANネットワークに設定するとDNSが消えるため、この禁止規則に従ってAPPLESERVER NETから*まですべてを許可します。

さて、pingをすると、ルールがアクティブな状態で約5〜10秒ごとにsshに1行が表示されます。ルールはなく、通常のマシンのように非常に迅速に実行されます。この問題は私のLANには存在しません。そのDNSサーバーは同じで、[pfsense]adminをブロックします。 [1 つの LAN が管理 LAN であるため、ブロックルールはありません。] LAN2 ですべてを実行し、管理のために LAN1 を手動で接続します。

アップデート - /tmp/debug.configが追加されました


#System aliases

loopback = "{ lo0 }"
WAN = "{ re0 }"
ADMIN = "{ re1 }"
LAN = "{ re2 }"
APPLESERVER = "{ re3 }"

#SSH Lockout Table
table <sshlockout> persist
table <webConfiguratorlockout> persist
#Snort tables
table <snort2c>

table <virusprot>

# User Aliases 
table <EasyRuleBlockHostsWAN> {   10.35.0.1/32 } 
EasyRuleBlockHostsWAN = "<EasyRuleBlockHostsWAN>"

# Gateways
GWOPT1GW = " route-to ( re2 192.168.1.1 ) "
GWWAN = " route-to ( re0 wan ip ) "


set loginterface re1
set optimization normal
set limit states 23000
set limit src-nodes 23000

set skip on pfsync0

scrub in on $WAN all    fragment reassemble
scrub in on $ADMIN all    fragment reassemble
scrub in on $LAN all    fragment reassemble
scrub in on $APPLESERVER all    fragment reassemble


no nat proto carp
no rdr proto carp
nat-anchor "natearly/*"
nat-anchor "natrules/*"


# Outbound NAT rules

# Subnets to NAT 
tonatsubnets    = "{ 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 127.0.0.0/8  }"
nat on $WAN  from $tonatsubnets port 500 to any port 500 -> 24.220.153.106/32 port 500  
nat on $WAN  from $tonatsubnets to any -> 24.220.153.106/32 port 1024:65535  


# Load balancing anchor
rdr-anchor "relayd/*"
# TFTP proxy
rdr-anchor "tftp-proxy/*"
rdr pass on re2 proto udp from any to any port tftp -> 127.0.0.1 port 6969
table <negate_networks> { 24.220.152.0/23 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 }
# NAT Inbound Redirects
rdr on re0 proto { tcp udp } from any to any port 21 -> 192.168.2.3
rdr on re0 proto { tcp udp } from any to any port 5000:5050 -> 192.168.2.3
rdr on re0 proto { tcp udp } from any to any port 80 -> 192.168.3.2
rdr on re0 proto { tcp udp } from any to any port 443 -> 192.168.3.2
# UPnPd rdr anchor
rdr-anchor "miniupnpd"

anchor "relayd/*"
#---------------------------------------------------------------------------
# default deny rules
#---------------------------------------------------------------------------
block in log all label "Default deny rule"
block out log all label "Default deny rule"

# We use the mighty pf, we cannot be fooled.
block quick proto { tcp, udp } from any port = 0 to any
block quick proto { tcp, udp } from any to any port = 0

# Block all IPv6
block in quick inet6 all
block out quick inet6 all

# Snort package
block quick from <snort2c> to any label "Block snort2c hosts"
block quick from any to <snort2c> label "Block snort2c hosts"

# SSH lockout
block in log quick proto tcp from <sshlockout> to any port 22 label "sshlockout"

# webConfigurator lockout
block in log quick proto tcp from <webConfiguratorlockout> to any port 443 label "webConfiguratorlockout"
block in quick from <virusprot> to any label "virusprot overload table"
table <bogons> persist file "/etc/bogons"
# block bogon networks
# http://www.cymru.com/Documents/bogon-bn-nonagg.txt
block in log quick on $WAN from <bogons> to any label "block bogon networks from WAN"
antispoof for re0
# block anything from private networks on interfaces with the option set
antispoof for $WAN
block in log quick on $WAN from 10.0.0.0/8 to any label "block private networks from wan block 10/8"
block in log quick on $WAN from 127.0.0.0/8 to any label "block private networks from wan block 127/8"
block in log quick on $WAN from 172.16.0.0/12 to any label "block private networks from wan block 172.16/12"
block in log quick on $WAN from 192.168.0.0/16 to any label "block private networks from wan block 192.168/16"
# allow our DHCP client out to the WAN
pass in on $WAN proto udp from any port = 67 to any port = 68 label "allow dhcp client out WAN"
pass out on $WAN proto udp from any port = 68 to any port = 67 label "allow dhcp client out WAN"
# Not installing DHCP server firewall rules for WAN which is configured for DHCP.
antispoof for re1
# allow access to DHCP server on ADMIN
pass in quick on $ADMIN proto udp from any port = 68 to 255.255.255.255 port = 67 label "allow access to DHCP server"
pass in quick on $ADMIN proto udp from any port = 68 to 192.168.1.1 port = 67 label "allow access to DHCP server"
pass out quick on $ADMIN proto udp from 192.168.1.1 port = 67 to any port = 68 label "allow access to DHCP server"
antispoof for re2
# allow access to DHCP server on LAN
pass in quick on $LAN proto udp from any port = 68 to 255.255.255.255 port = 67 label "allow access to DHCP server"
pass in quick on $LAN proto udp from any port = 68 to 192.168.2.1 port = 67 label "allow access to DHCP server"
pass out quick on $LAN proto udp from 192.168.2.1 port = 67 to any port = 68 label "allow access to DHCP server"
antispoof for re3
# allow access to DHCP server on APPLESERVER
pass in quick on $APPLESERVER proto udp from any port = 68 to 255.255.255.255 port = 67 label "allow access to DHCP server"
pass in quick on $APPLESERVER proto udp from any port = 68 to 192.168.3.1 port = 67 label "allow access to DHCP server"
pass out quick on $APPLESERVER proto udp from 192.168.3.1 port = 67 to any port = 68 label "allow access to DHCP server"

# loopback
pass in on $loopback all label "pass loopback"
pass out on $loopback all label "pass loopback"
# let out anything from the firewall host itself and decrypted IPsec traffic
pass out all keep state allow-opts label "let out anything from firewall host itself"
pass out route-to ( re0 wan ip ) from 24.220.153.106 to !24.220.152.0/23 keep state allow-opts label "let out anything from firewall host itself"
# make sure the user cannot lock himself out of the webConfigurator or SSH
pass in quick on re1 proto tcp from any to (re1) port { 80 443  22 } keep state label "anti-lockout rule"

# User-defined rules follow

anchor "userrules/*"
block  in  quick  on $WAN reply-to ( re0 wan ip )  from   $EasyRuleBlockHostsWAN to any  label "USER_RULE: Easy Rule: Blocked from Firewall Log View"
pass   in  quick  on $WAN reply-to ( re0 wan ip )  proto { tcp udp }  from any to   192.168.2.3 port 21   label "USER_RULE: NAT "
pass   in  quick  on $WAN reply-to ( re0 wan ip )  proto { tcp udp }  from any to   192.168.2.3 port 4999 >< 5051   label "USER_RULE: NAT "
pass   in  quick  on $WAN reply-to ( re0 wan ip )  proto { tcp udp }  from any to   192.168.3.2 port 80   label "USER_RULE: NAT Rule for web 80"
pass   in  quick  on $WAN reply-to ( re0 wan ip )  proto { tcp udp }  from any to   192.168.3.2 port 443   label "USER_RULE: NAT ssl web "
block  in  quick  on $WAN reply-to ( re0 wan ip )  from any to any  label "USER_RULE"
block  in  quick  on $ADMIN  from any to any  label "USER_RULE"
block  in  quick  on $LAN  from any to   192.168.2.1  label "USER_RULE"
block  in  quick  on $LAN  from any to   192.168.1.1  label "USER_RULE"
block  in  quick  on $LAN  from any to   192.168.3.1  label "USER_RULE"
pass  in  quick  on $LAN  from 192.168.2.1/24 to any keep state  label "USER_RULE: Default allow OPT1 to any rule"
pass  in  quick  on $LAN  proto tcp  from any to 192.168.3.1/24 port 22  flags S/SA keep state  label "USER_RULE"
pass  in  quick  on $LAN  proto tcp  from any to 192.168.3.1/24 port 80  flags S/SA keep state  label "USER_RULE"
pass  in  quick  on $LAN  proto tcp  from any to 192.168.3.1/24 port 81  flags S/SA keep state  label "USER_RULE"
pass  in  quick  on $LAN  proto { tcp udp }  from any to   192.168.3.2 port 10000  keep state  label "USER_RULE"
pass  in  quick  on $LAN  proto tcp  from 192.168.2.1/24 to 192.168.3.1/24 port 443  flags S/SA keep state  label "USER_RULE"
block  in  quick  on $LAN  from any to any  label "USER_RULE"
block  in  quick  on $APPLESERVER  from any to 192.168.2.1  label "USER_RULE"
block  in  quick  on $APPLESERVER  proto { tcp udp }  from any to   192.168.3.1 port 80   label "USER_RULE"
block  in  quick  on $APPLESERVER  proto { tcp udp }  from any to   192.168.3.1 port 443   label "USER_RULE"
block  in  quick  on $APPLESERVER  proto { tcp udp }  from any to   192.168.3.1 port 22   label "USER_RULE"
block  in  quick  on $APPLESERVER  from any to 192.168.1.0/24  label "USER_RULE"
pass  in  quick  on $APPLESERVER  from 192.168.3.1/24 to any keep state  label "USER_RULE"

# VPN Rules
anchor "tftp-proxy/*"

debug.configファイルに更新しました。だから私が解決した方法は、192.168.3.0/24サブネット[appleserverサブネット]から22,80,443だけをブロックすることでした。これは速度の問題を解決しましたが、正しく修正するのが良い方法であるかどうかはわかりません。

おそらくこれはDNSの問題かもしれませんが、リモートシステムでwan ipを入力するのに、すべてのブロックルールがドメイン名ルーティングで有効になっている場合とほぼ[長い]時間がかかります。

ベストアンサー1

おすすめ記事