CSF firewall and OpenVPN
Posted: 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 :
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