NAT for use with OpenVPN

Phil Staub phil at staub.us
Wed Nov 13 15:27:58 UTC 2019


On Wed, Nov 13, 2019 at 10:12 AM Morgan Wesström <
freebsd-database at pp.dyndns.biz> wrote:

> >   # tcpdump -nvvi br0 icmp
>
> eth0 is your external interface so try:
>
> # tcpdump -ni eth0 icmp
>
> Then ping 8.8.8.8 from your VPN client and see what shows up.
>
> br0 is a virtual bridge interface. This is what they use to connect your
> internal interface and your wlan interface together (and maybe some
> more) so they look as a single entity and one physical network. This way
> they can have a single subnet spanning both those interfaces instead of
> multiple subnets which would probably confuse most regular users. :)
>

# tcpdump -nvvi eth0 icmp
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535
bytes
15:22:29.614953 IP (tos 0x0, ttl 62, id 5638, offset 0, flags [DF], proto
ICMP (1), length 84)
    10.8.0.8 > 8.8.8.8: ICMP echo request, id 13, seq 1, length 64
15:22:31.059524 IP (tos 0x0, ttl 62, id 5808, offset 0, flags [DF], proto
ICMP (1), length 84)
    10.8.0.8 > 8.8.8.8: ICMP echo request, id 13, seq 2, length 64
15:22:31.733821 IP (tos 0x0, ttl 62, id 6095, offset 0, flags [DF], proto
ICMP (1), length 84)
    10.8.0.8 > 8.8.8.8: ICMP echo request, id 13, seq 3, length 64
15:22:32.725210 IP (tos 0x0, ttl 62, id 6162, offset 0, flags [DF], proto
ICMP (1), length 84)
    10.8.0.8 > 8.8.8.8: ICMP echo request, id 13, seq 4, length 64
15:22:35.341540 IP (tos 0x0, ttl 62, id 6344, offset 0, flags [DF], proto
ICMP (1), length 84)
    10.8.0.8 > 8.8.8.8: ICMP echo request, id 13, seq 5, length 64
^C
5 packets captured
7 packets received by filter
0 packets dropped by kernel

As (I think) you expected, the ping to my public ip (and all the other
devices pinging the router) didn't show up this time.

Are you thinking that the ping should be coming from 192.168.1.200 (my
OpenVPN server machine)? If not, how else would you know whether the
address is being NATed?

Phil


> /Morgan
> _______________________________________________
> freebsd-pf at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-pf
> To unsubscribe, send any mail to "freebsd-pf-unsubscribe at freebsd.org"
>


More information about the freebsd-pf mailing list