• This forum has a zero tolerance policy regarding spam. If you register here to publish advertising, your user account will be deleted without further questions.

Strongswan Ubuntu Verbindungsproblem

Apex

New Member
Hallo, ich habe folgendes Problem:

Strongswan auf Ubuntu 14.04 LTS installiert, System ist auf dem neusten Stand.
Der VPN Server ist aber nicht zu erreichen.

Firewall Regeln:
Code:
#!/bin/sh
 
# Flush old rules, old custom tables
/sbin/iptables --flush
/sbin/iptables --flush -t nat
/sbin/iptables --delete-chain
 
# Set default policies for all three default chains
/sbin/iptables -P INPUT DROP
/sbin/iptables -P FORWARD DROP
/sbin/iptables -P OUTPUT ACCEPT
 
# Enable free use of loopback interfaces
/sbin/iptables -A INPUT -i lo -j ACCEPT
/sbin/iptables -A OUTPUT -o lo -j ACCEPT
 
# Allow VPN forwarding
/sbin/iptables -A FORWARD -i tun+ -j ACCEPT
/sbin/iptables -A FORWARD -o tun+ -j ACCEPT
/sbin/iptables -A FORWARD -i dns+ -j ACCEPT
/sbin/iptables -A FORWARD -o dns+ -j ACCEPT
 
# Accept limited inbound ICMP messages
/sbin/iptables -I INPUT -p icmp --icmp-type echo-request -m recent --set
/sbin/iptables -I INPUT -p icmp --icmp-type echo-request -m recent --update --seconds 5 --hitcount 10 -j DROP
/sbin/iptables -A INPUT -p icmp -j ACCEPT
 
# All TCP sessions should begin with SYN
/sbin/iptables -A INPUT -p tcp ! --syn -m state --state NEW -s 0/0 -j DROP
 
# Accept inbound TCP packets
/sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
 
/sbin/iptables -A INPUT -p tcp --dport 22 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 80 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 443 -m state --state NEW -j ACCEPT
 
# Accept inbound UDP packets
/sbin/iptables -A INPUT -p udp -m udp --dport 53 -j ACCEPT
/sbin/iptables -A INPUT -p udp -m udp --dport 1194 -j ACCEPT
 
# Accept IPSEC packets
/sbin/iptables -A INPUT -p esp -j ACCEPT
/sbin/iptables -A INPUT -p 50 -j ACCEPT
/sbin/iptables -A INPUT -p 51 -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 500 -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 4500 -j ACCEPT
 
# VPN NAT
/sbin/iptables -t nat -A POSTROUTING -s 10.0.0.0/8 -o eth0 -j MASQUERADE

config setup
cachecrls=yes
uniqueids=yes

conn ios
keyexchange=ikev1
authby=xauthpsk
xauth=server
left=%defaultroute
leftsubnet=0.0.0.0/0
leftfirewall=yes
right=ServerIP
rightsubnet=10.7.0.0/24
rightsourceip=10.7.0.2/24
rightdns=4.2.2.1
auto=add

ServerIP %any : PSK "pw"

jan : XAUTH "password"
someone : XAUTH "password"

Versuche ich mich jetzt mit dem iPhone zu verbinden kommt die Fehlermeldung das der Server nicht erreichbar ist.

Netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 8577 1430/sshd
tcp6 0 0 :::22 :::* LISTEN 0 8579 1430/sshd
udp 0 0 0.0.0.0:4500 0.0.0.0:* 0 7888 911/charon
udp 0 0 xxxxxxxxxx:123 0.0.0.0:* 0 10587 1107/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 0 10586 1107/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 0 10579 1107/ntpd
udp 0 0 0.0.0.0:500 0.0.0.0:* 0 7887 911/charon
udp6 0 0 :::4500 :::* 0 7886 911/charon
udp6 0 0 IPv6 müll:123 :::* 104 11077 1107/ntpd
udp6 0 0 IPv6 Müll:::123 :::* 104 11076 1107/ntpd
udp6 0 0 ::1:123 :::* 0 10588 1107/ntpd
udp6 0 0 :::123 :::* 0 10580 1107/ntpd
udp6 0 0 :::500 :::* 0 7885 911/charon

Ich sehe auch nicht wirklich das die Ports hier offen sind ? Ein Port check sagt auch das die Ports zu sind, aber mit den Firewall regeln werden sie doch eingeschaltet ?. Die Ports sind unter 0.0.0.0:port geöffnet Jedoch nicht unter der IP worüber der Server erreichbar drüber ist.
 
Back
Top