Hello!
I've installed FReeBSD 11 on my client mashine. On my server I have also FreeBSD 11.
My client has 3G modem which successfully connects through ppp daemon to the cellurar network.
After that my client successfully establish L2TP IPSec connection to my server.
After that I connect to my client from my server through SSH.
Conection succeded, but after some random time delay (during y ssh session) connection drops with message "operation_not_permitted". There is no any error messages, when I start SSH connection with -vvv flag and there is no any messages on server\client side on syslog's. Also, I checked tcpdump -n -e -ttt -i pflog0 - and also there is no any blocked or dropped packets.
I suppose, that there is MTU issue. Cellurar signal fine and pings have only 50 msec's delay.
I tried to set MTU on PPP interface and VPN interface to 960, but disconnections still happens.
Also, by default, ny VPN server set's MTU to 1280.
Could you help with advice, what should I check? It seems, like this is a client issue, because from my phone everythings work fine and if I connect to SSH from client's wi-fi hostpad - there is no any disconnections.
Here is the example of SSH interruption -
Here is my PF.conf on client side
I've installed FReeBSD 11 on my client mashine. On my server I have also FreeBSD 11.
My client has 3G modem which successfully connects through ppp daemon to the cellurar network.
After that my client successfully establish L2TP IPSec connection to my server.
After that I connect to my client from my server through SSH.
Conection succeded, but after some random time delay (during y ssh session) connection drops with message "operation_not_permitted". There is no any error messages, when I start SSH connection with -vvv flag and there is no any messages on server\client side on syslog's. Also, I checked tcpdump -n -e -ttt -i pflog0 - and also there is no any blocked or dropped packets.
I suppose, that there is MTU issue. Cellurar signal fine and pings have only 50 msec's delay.
I tried to set MTU on PPP interface and VPN interface to 960, but disconnections still happens.
Also, by default, ny VPN server set's MTU to 1280.
Could you help with advice, what should I check? It seems, like this is a client issue, because from my phone everythings work fine and if I connect to SSH from client's wi-fi hostpad - there is no any disconnections.
Here is the example of SSH interruption -
Code:
candy-pi# Fssh_packet_write_poll: Connection to 10.1.20.1 port 22: Operation not permitted
Here is my PF.conf on client side
Code:
# interfaces
lan_if="ue0"
ext_if="tun0"
wifi_if="wlan0"
vpn_if="ng0"
localnet = "10.1.20.0/24"
my_server= $ext_if:network
vpn_net = "172.16.1.0/24"
locked_jail = "{10.1.20.2}"
icmp_types = "{ echoreq, unreach }"
######################FW##############################
client_tcp = "{1,5,7,18,20,21,22,23,25,29,37,42,53,67,68,80,81,88,109,110,115,118,119,123,137,139,143,150,156,161,443,546,548,554,1701,500,580:994,1701,1723,3000:6100,8123,8118,8080,8081,9050,9051,9091,>=10000}"
client_udp = "{ 47, 53, 67, 68, 123, 135:139, 500, 1701, 1723, 4500, >=6000 }"
external_tcp = "{ http,22 }"
external_udp = "{ 47, 67, 68, 123, 500, 1701, 4500, >=7000 }"
martians = "{ 127.0.0.0/8, 192.168.0.0/16, 169.254.0.0/16, 192.0.2.0/24, 240.0.0.0/4 }"
table <portsentry> persist
table <fail2ban> persist
set limit { states 1000000, frags 80000, src-nodes 100000, table-entries 500000}
set state-policy if-bound
set optimization normal
set debug urgent
set ruleset-optimization profile
set timeout { frag 10, tcp.established 3600, src.track 30 }
set block-policy drop
set skip on { lo0, ue0, ng0, ng1, ng2, ng3, ng4, ng5 }
scrub in all
#### --- QUEUEING ------------------------------------------------------------------ ##
# ext_if IP address could be dynamic, hence ($ext_if)
nat on $ext_if inet from $localnet to any -> ($ext_if)
nat on $ext_if inet from $vpn_net to any -> ($ext_if)
#rdr on {$int_if,ng0,ng1,ng2,ng3,ng4,ng5,ng6} proto tcp from any to !<goodguys> port 80 -> 10.1.10.1 port 3128
#rdr on {$int_if,ng0,ng1,ng2,ng3,ng4,ng5,ng6} proto tcp from any to !<goodguys> port 443 -> 10.1.10.1 port 3129
antispoof quick for $ext_if
block log quick from <portsentry>
block log quick from <fail2ban>
block in quick on $ext_if from $martians to any
block out quick on $ext_if from any to $martians
block log quick from any os NMAP
block quick from $locked_jail to {!$localnet,!$vpn_net}
block log all
pass quick on ng0
pass inet proto icmp all
pass in on $wifi_if proto tcp from any to any port $client_tcp flags S/SA keep state
pass in on $wifi_if proto udp from any to any port $client_udp keep state
pass in on $wifi_if proto udp to 255.255.255.255 keep state
pass in on $wifi_if proto udp to $wifi_if:broadcast keep state
pass in on $wifi_if proto igmp all allow-opts
pass in on $wifi_if proto esp
pass in on $wifi_if proto ah
pass in on $wifi_if proto ipencap
pass out on $wifi_if keep state
pass in on $ext_if proto tcp from any to any port $external_tcp flags S/SA keep state (max-src-conn 250)
pass in on $ext_if proto udp from any to any port $external_udp keep state
pass in on $ext_if proto esp
pass in on $ext_if proto ah
pass in on $ext_if proto ipencap
pass out on $ext_if keep state