CSF firewall and OpenVPN

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
Tomy666
OpenVpn Newbie
Posts: 2
Joined: Sat Jan 30, 2021 10:18 pm

CSF firewall and OpenVPN

Post by Tomy666 » Sat Jan 30, 2021 10:31 pm

Hello
I have a problem with the cooperation between openvpn and the csf v14.08 firewall in my serwer.
Open vpn client connects correctly. Has internet access.
However, I am blocked from connecting to devices inside the VPN. (10.8.0.1)
I do not ping other devices in the VPN.
Please can you help me guys ;-)

I have created cfspre.sh file :

Code: Select all

#!/bin/bash
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
iptables -A FORWARD -j REJECT
iptables -A INPUT -i tun0 -j ACCEPT
iptables -A OUTPUT -o tun0 -j ACCEPT
iptables -A FORWARD -i ppp+ -o eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o ppp+ -j ACCEPT
iptables -A FORWARD -i tun0 -o eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o tun0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -j SNAT --to-source myserwerip

Post Reply