How to properly forward all traffic through VPN in 11? (port forwarding)

matuko

New Member


Messages: 2

I have FreeBSD 11 on a server where I've installed OpenVPN and I need to setup VPN properly to be able to put internet traffic through it.

I can't connect to the internet anymore from my local computer after I've established a connection with my server via VPN. I guess the issue is port forwarding and I want to set it up properly via /etc/pf.conf.

Here's what I have:
Code:
    sysctl net.inet.ip.forwarding  #=> net.inet.ip.forwarding: 1
And
Code:
    $ cat /etc/rc.conf
   
    ifconfig_vtnet0="dhcp"
    openvpn_enable="YES"
    openvpn_if="tun"
    gateway_enable="YES"

And the openVPN config of the server:

Code:
push "redirect-gateway def1 bypass-dhcp"
    push "dhcp-option DNS 208.67.222.222"
    push "dhcp-option DNS 208.67.220.220"

Yet, the error I have on the server observed in its logs is:

Code:
    MULTI: bad source address from client [x.x.x.x], packet dropped
I've read the handbook but it wasn't clear what exactly I have to use from it.

What have I forgotten?
 
Last edited by a moderator:
OP
M

matuko

New Member


Messages: 2

I've added this

Code:
firewall_enable="YES"
firewall_type="open"
and now I'm able to connect to the internet but the error with dropping the packets remains.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 9,135
Messages: 33,711

Please don't bump threads. Your issue has nothing to do with port forwarding. Also note that firewall_enable enables IPFW, /etc/pf.conf is for PF. Those are two different firewalls.
 
Top