2

I'm up ipsec vpn to remote host. Since the remote host accepts only one ip i'm up nat for local net on enc0. Ping from ipsec host is ok:

PING 172.20.162.150 (172.20.162.150): 56 data bytes
64 bytes from 172.20.162.150: icmp_seq=0 ttl=252 time=2.597 ms

But ping from local net is fail:

PING 172.20.162.150 (172.20.162.150) 56(84) bytes of data.
From 192.168.1.5 icmp_seq=1 Frag needed and DF set (mtu = 0)

MTU for enc0 = 0 and I can not change it

netstat -i
Name    Mtu   Network     Address              Ipkts Ierrs    Opkts Oerrs Colls
enc0    0     <Link>                              29     0       29     0     0
enc0    0     172.25.41.1 172.25.41.10            29     0       29     0     0

I've tried use scrub in pf.conf but it did not help:

match in on enc0 scrub (no-df max-mss 1452) 

or match in all scrub (no-df max-mss 1452)

sudo ifconfig enc0 mtu 1452 return:

SIOCSIFMTU: Inappropriate ioctl for device

Unfortunately, there is no solution options (((

Other settings that may help to understand:

172.20.162.150 - remote host
172.25.41.10 - local ip for enc0 (only this ip accepted by 172.20.162.150)
192.168.1.0/24 local net and 192.168.1.5 ip of my host for local net

/etc/hostname.enc0
inet 172.25.41.10 255.255.255.255
up
!/sbin/route add -host 172.20.162.150 172.25.41.10

/etc/ipsec.conf
ike esp from 172.25.41.10/32 to 172.20.162.150/32 peer 80.*.*.132 \
    main auth hmac-sha1 enc aes-256 group modp1024 lifetime 86400 \
    quick auth hmac-sha1 enc aes-256 group modp1024 lifetime 3600 \
    psk ***********

/etc/pf.conf
pass from 172.20.162.150 to any
pass out quick on enc0 from <localnet> to 172.20.162.150 nat-to enc0 keep state (if-bound)

tcpdump for ping from local net for internal net if
192.168.1.13 > 172.20.162.150: icmp: echo request (id:777a seq:5) [icmp cksum ok] (DF) (ttl 64, id 30758, len 84)
192.168.1.5 > 192.168.1.13: icmp: 172.20.162.150 unreachable - need to frag [icmp cksum ok] (ttl 255, id 44410, len 56, bad ip cksum 0! -> 8ae7)

tcpdump for enc0 is empty.

Statistic for nat from pfctl:
sudo pfctl -s state | grep 172.20.162.150
all icmp 172.20.162.150:8 <- 192.168.1.13:30586       0:0
enc0 icmp 172.25.41.10:61751 (192.168.1.13:30586) -> 172.20.162.150:8       0:0

Can someone faced with similar, prompt solution to the problem.

Morry
  • 21
  • 4
  • 1
    Do not [crosspost](https://unix.stackexchange.com/questions/348700/ping-error-through-enc0-frag-needed-and-df-set-mtu-0). – Sven Mar 02 '17 at 20:11
  • I'm not leaving 2 messages and delete that, there will be no feedbacks, when I find a solution or get an answer. Yet, I'd want to get comments on the problem. – Morry Mar 03 '17 at 00:39

0 Answers0