Show pagesourceOld revisionsBacklinksBack to top × Table of Contents PPPoSSH server Introduction Goals Command-line instructions 1. Preparation 2. Key management 3. Firewall 4. VPN service Testing Troubleshooting PPPoSSH server This article relies on the following: Accessing web interface / command-line interface Managing configs / packages / services / logs Introduction This how-to describes the method for setting up PPPoSSH server on OpenWrt. Follow PPPoSSH client for client setup and PPPoSSH extras for additional tuning. Goals Encrypt your internet connection to enforce security and privacy. Prevent traffic leaks and spoofing on the client side. Bypass regional restrictions using commercial providers. Escape client side content filters and internet censorship. Access your LAN services remotely without port forwarding. Command-line instructions 1. Preparation Specify configuration parameters for VPN server. # Configuration parameters VPN_PORT="22" 2. Key management Generate and exchange keys between client and server. Set up key-based authentication. # Server private key VPN_KEY="/etc/dropbear/dropbear_ed25519_host_key" # Generate server public key dropbearkey -y -f ${VPN_KEY} \ | sed -n -e "/^ssh-\S*\s/p" > sshserver.pub # Client public key VPN_PUB="$(cat sshclient.pub)" # Configure PKI cat << EOF >> /etc/dropbear/authorized_keys ${VPN_PUB} EOF 3. Firewall Consider VPN network as private. Assign VPN interface to LAN zone to minimize firewall setup. Allow access to VPN server from WAN zone. # Configure firewall uci rename firewall.@zone[0]="lan" uci rename firewall.@zone[1]="wan" uci del_list firewall.lan.device="ppp+" uci add_list firewall.lan.device="ppp+" uci -q delete firewall.pppossh uci set firewall.pppossh="rule" uci set firewall.pppossh.name="Allow-PPPoSSH" uci set firewall.pppossh.src="wan" uci set firewall.pppossh.dest_port="${VPN_PORT}" uci set firewall.pppossh.proto="tcp" uci set firewall.pppossh.target="ACCEPT" uci commit firewall /etc/init.d/firewall restart 4. VPN service Configure VPN service. Disable password authentication. # Configure VPN service uci set dropbear.@dropbear[0].Port="${VPN_PORT}" uci set dropbear.@dropbear[0].PasswordAuth="0" uci set dropbear.@dropbear[0].RootPasswordAuth="0" uci commit dropbear /etc/init.d/dropbear restart Testing Establish the VPN connection. Verify your routing with traceroute and traceroute6. traceroute openwrt.org traceroute6 openwrt.org Check your IP and DNS provider. https://ipleak.net/ https://dnsleaktest.com/ Troubleshooting Collect and analyze the following information. # Restart services /etc/init.d/log restart; /etc/init.d/dropbear restart; sleep 10 # Log and status logread -e dropbear; netstat -l -n -p | grep -e dropbear # Runtime configuration pgrep -f -a dropbear; pgrep -f -a pppd ip address show; ip route show table all ip rule show; ip -6 rule show; nft list ruleset # Persistent configuration uci show network; uci show firewall; uci show dropbear This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.OKMore information about cookies Last modified: 2023/03/16 08:52by vgaetera