Score:0

OpenVPN Block Specific Ports for client

de flag

I'm trying to block specific ports for a client. The documentation doesn't really help me and I can't really find any tutorials either. I have read that I have to specify client-config-dir ccd in server.conf in order to then make the individual configurations for the clients

But when I try to connect, I get malformed netmask as an error Anyone know what I'm doing wrong? These are my configuration files:

server.conf

local SERVERIP
port 1194
proto udp
dev tun0
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-crypt tc.key
topology subnet
server 10.8.0.0 255.255.255.0
client-config-dir ccd
push "redirect-gateway def1 bypass-dhcp"
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 1.1.1.1"
push "dhcp-option DNS 1.0.0.1"
keepalive 10 120
cipher AES-256-CBC
user nobody
group nogroup
persist-key
persist-tun
verb 3
crl-verify crl.pem
explicit-exit-notify

ccd/client

ifconfig-push 10.8.1.1 10.8.1.2
iptables -A INPUT -i tun0 -p udp --dport 6672 -j DROP
iptables -A INPUT -i tun0 -p udp --dport 61455 -j DROP
iptables -A INPUT -i tun0 -p udp --dport 61457 -j DROP
iptables -A INPUT -i tun0 -p udp --dport 61456 -j DROP
iptables -A INPUT -i tun0 -p udp --dport 61458 -j DROP
cn flag
Your server has a 24-bit netmask that doesn't include your client range. You need to add `route 10.8.1.0 255.255.255.0` to your server conf or change your server/client ranges.
cn flag
https://openvpn.net/community-resources/configuring-client-specific-rules-and-access-policies/
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.