Can't ssh externally while using vpn

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
bizzaro
Posts: 7
Joined: Mon Feb 13, 2017 12:20 am

Can't ssh externally while using vpn

Post by bizzaro »

A while ago I set up my pi as a seed box with dietpi and deluge, with all connections going through a vpn. Recently I decided I wanted to be able to access it from outside my network, but am not sure how to get it to work. I forwarded the deluge and ssh ports, but can't access either. I can ssh externally into another pi on my network. I'm not an expert at this, but I'm guessing the problem is in my iptables:

# Generated by iptables-save v1.4.21 on Mon Feb 13 16:07:00 2017
*filter
:INPUT ACCEPT [136:6899]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A FORWARD -i tun0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth0 -o tun0 -j ACCEPT
-A OUTPUT -o tun0 -m comment --comment vpn -j ACCEPT
-A OUTPUT -o eth0 -p icmp -m comment --comment icmp -j ACCEPT
-A OUTPUT -d 192.168.1.0/24 -o eth0 -m comment --comment lan -j ACCEPT
-A OUTPUT -o eth0 -p udp -m udp --dport 1198 -m comment --comment openvpn -j AC$
-A OUTPUT -o eth0 -p tcp -m tcp --sport 22 -m comment --comment ssh -j ACCEPT
-A OUTPUT -o eth0 -p udp -m udp --dport 123 -m comment --comment ntp -j ACCEPT
-A OUTPUT -o eth0 -p udp -m udp --dport 53 -m comment --comment dns -j ACCEPT
-A OUTPUT -o eht0 -p tcp -m tcp --dport 53 -m comment --comment dns -j ACCEPT
-A OUTPUT -o eth0 -j DROP
COMMIT
# Completed on Mon Feb 13 16:07:00 2017
# Generated by iptables-save v1.4.21 on Mon Feb 13 16:07:00 2017
*nat
:PREROUTING ACCEPT [42:7109]
:INPUT ACCEPT [32:6673]
:OUTPUT ACCEPT [436:56179]
:POSTROUTING ACCEPT [2:330]
-A POSTROUTING -o tun0 -j MASQUERADE
COMMIT
# Completed on Mon Feb 13 16:07:00 2017
Post Reply