Then, create this directory: mkdir /etc/openvpn/ccd Open configuration file /etc/openvpn/server/nf in your favourite editor, and add a directive that specify a location of openvpn client config directory: client-config-dir /etc/openvpn/ccd First, we need to enable ccd configuration in openvpn server settings. We will do that with config file put in openvpn client configuration directory (ccd) on droplet. We have to provide a static IP address to our vpn client to configure port forwarding efficiently. For example: sudo sh -c "iptables-save > /etc/les"Ģ. We need to save iptables ruleset to a file, to recreate firewall settings after rebooting. So, we are adding an appropriate rule: sudo iptables -table filter -insert INPUT 1 -protocol tcp -dport 22 -jump ACCEPT Let’s assume we use iptables to configure firewall on our vpn client. The port that sshd listens on has to be open in firewall’s settings on vpn client. It would demand changing sshd configuration or changing our approach to openvpn configuration. It would be a bit more complicated if sshd listened on particular network interface only. So, we are lucky because sshd service will be immediately available on virtual vpn interface when it is up. Local Address 0.0.0.0:22 indicates that sshd listens on port 22 on each network interface with IP address assigned to it. OutputProto Local Address Foreign Address State PID/Program name
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |