example
iface eth0 inet static
address 192.168.3.100
netmask 255.255.255.0
gateway 192.168.3.1
dns-nameservers 9.9.9.9 1.1.1.1
CGroup: /system.slice/ocserv.service
├─2191 ocserv-main
└─2194 ocserv-sm
Your cert is in /home/yourname/.acme.sh/your.dynu.net/your.dynu.net.cer
Your cert key is in /home/yourname/.acme.sh/your.dynu.net/your.dynu.net.key
The intermediate CA cert is in /home/yourname/.acme.sh/youryiu.dynu.net/ca.cer
And the full chain certs is there: /home/yourname/.acme.sh/your.dynu.net/fullchain.cer
acme.sh --install-cert -d your.dynu.net \
--key-file /etc/ocserv/ssl/server.key \
--cert-file /etc/ocserv/ssl/server.crt \
--fullchain-file /etc/ocserv/ssl/fullchain.crt \
--reloadcmd "cat /etc/ocserv/ssl/server.crt /etc/ocserv/ssl/server.key > /root/ssl/server.pem
&& systemctl restart ocserv"
server-cert = /etc/ocserv/ssl/fullchain.crt
server-key = /etc/ocserv/ssl/server.key
listen-host-is-dyndns = true
max-same-clients = 10
try-mtu-discovery = true
auth-timeout = 100
auth = "pam[gid-min=1000]"
enable-auth = "certificate"
1. Generate Private Key
2. Generate Certification base on Private key and ca template
cn = "your.dynu.net"
organization = "HP"
serial = 1
expiration_days = -1
ca
signing_key
cert_signing_key
crl_signing_key
organization = "HP"
cn = "your.dynu.net"
expiration_days = 3650
tls_www_client
signing_key
encryption_key
cn = "user"
unit = "admins"
expiration_days = 3650
signing_key
tls_www_client
tls-priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT:-RSA:-VERS-SSL3.0:-ARCFOUR-128:-VERS-TLS1.0:-VERS-TLS1.1:-VERS-TLS1.3"
ca-cert = /etc/ocserv/ssl/ca-cert.pem
cert-user-oid = 2.5.4.3
# Uncomment this to allow this host to route packets between interfaces
net/ipv4/ip_forward=1
net/ipv6/conf/all/forwarding=1
sudo iptables -A FORWARD -s 192.168.200.0/24 -j ACCEPT
sudo iptables -t nat -A POSTROUTING -s 192.168.200.0/24 -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
sudo iptables -A FORWARD -o vpns+ -j ACCEPT
sudo iptables -A FORWARD -i vpns+ -j ACCEPT
sudo apt install -y iptables-persistent
dns = 9.9.9.9
dns = 1.1.1.1
try-mtu-discovery = true
#route = 10.0.0.0/8
#route = 172.16.0.0/12
#route = 192.168.0.0/16
# use ssl-support. Works with ssl-library
ssl=yes
# get ip from server.
use=web, web=checkip.dynu.com/, web-skip='IP Address'
# default server
server=api.dynu.com
# default login
login=your email id
# default password
password=***********
protocol=dyndns2
your.dynu.com
run_ipup="false"
run_daemon="true"
sudo rm ddclient.cache <- ddclient check cache is there any change. not with real DNS
sudo systemctl restart ddclient
歡迎光臨 電訊茶室 (http://telecom-cafe.com/forum/) | Powered by Discuz! 7.2 |