Hey..
Still back in old topic.
I tried to remake my VPN-network. I created whole new certs, debians, everything. I think I've missed something, because now connection even between linux-clients doesn't work(!).
I think it could be in my netfilter-roles. I just can't figure out what I've missed. But I'm pretty sure something is wrong with my server-setup, not with the clients.
openvpn.conf
proto udp
mode server
tls-server
mute-replay-warnings
log /var/log/openvpn/kk4.log
float
port 58000
dev tap
ca keys/ca.crt
cert keys/server.crt
key keys/server.key
writepid /var/run/openvpn/openvpn.pid
dh keys/dh1024.pem
server 10.0.1.0 255.255.255.0
route 10.0.1.1 255.255.255.0
ifconfig-pool-persist ipp.txt
client-config-dir ccd
keepalive 10 120
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
verb 3
This server-computer has 1 public ip (eth0) and it is making LAN-network with DHCP in eth1. t ap0 is VPN-network with 10.0.1.x pool.
ifconfig
eth0 Link encap:Ethernet HWaddr 00:1d:92:6a:68:9a
inet addr:*deleted* Bcast:*deleted* Mask:255.255.192.0
inet6 addr: fe80::21d:92ff:fe6a:689a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:44925083 errors:2 dropped:0 overruns:0 frame:2
TX packets:36244260 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1169869869 (1.0 GiB) TX bytes:1766505299 (1.6 GiB)
eth1 Link encap:Ethernet HWaddr 00:00:1c:d7:ee:4d
inet addr:192.168.100.1 Bcast:192.168.100.255 Mask:255.255.255.0
inet6 addr: fe80::200:1cff:fed7:ee4d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:40617799 errors:0 dropped:0 overruns:0 frame:0
TX packets:48840517 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2115895710 (1.9 GiB) TX bytes:1465379246 (1.3 GiB)
Interrupt:16 Base address:0xec00
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2313 errors:0 dropped:0 overruns:0 frame:0
TX packets:2313 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:110790 (108.1 KiB) TX bytes:110790 (108.1 KiB)
tap0 Link encap:Ethernet HWaddr 86:23:64:30:4e:4b
inet addr:10.0.1.1 Bcast:10.0.1.255 Mask:255.255.255.0
inet6 addr: fe80::8423:64ff:fe30:4e4b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2876 errors:0 dropped:0 overruns:0 frame:0
TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:712621 (695.9 KiB) TX bytes:930 (930.0 B)
route:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.100.0 * 255.255.255.0 U 0 0 0 eth1
10.0.1.0 * 255.255.255.0 U 0 0 0 tap0
*public-ip* * 255.255.192.0 U 0 0 0 eth0
default host*public* 0.0.0.0 UG 0 0 0 eth0
iptables:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere icmp echo-request limit: avg 1/min burst 5
ACCEPT icmp -- anywhere anywhere icmp echo-request limit: avg 30/sec burst 30
ACCEPT tcp -- anywhere anywhere tcp dpt:auth
ACCEPT tcp -- anywhere anywhere tcp dpt:ssmtp
ACCEPT tcp -- anywhere anywhere tcp dpt:submission
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
ACCEPT tcp -- anywhere anywhere tcp dpt:imap2
ACCEPT tcp -- anywhere anywhere tcp dpt:imaps
REJECT tcp -- anywhere anywhere multiport dports netbios-ns,netbios-dgm,netbios-ssn reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere multiport dports netbios-ns,netbios-dgm,netbios-ssn reject-with icmp-port-unreachable
REJECT udp -- 62.2.0.0/16 anywhere udp dpt:domain reject-with icmp-port-unreachable
REJECT udp -- 81-228-0-0.link.se.telia.net/16 anywhere udp dpt:domain reject-with icmp-port-unreachable
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:nameserver
DROP tcp -- 148.235.0.0/16 anywhere tcp dpt:domain
DROP udp -- 148.235.0.0/16 anywhere udp dpt:domain
DROP tcp -- 200.33.146.0/24 anywhere tcp dpt:domain
DROP udp -- 200.33.146.0/24 anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere multiport dports 15000:15050
ACCEPT udp -- anywhere anywhere multiport dports 15000:15050
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:89
ACCEPT tcp -- anywhere anywhere tcp dpt:www
ACCEPT tcp -- anywhere anywhere tcp dpt:https
ACCEPT udp -- anywhere anywhere udp dpt:openvpn
ACCEPT udp -- anywhere anywhere udp dpt:58000
droplog all -- anywhere anywhere
Chain FORWARD (policy DROP)
target prot opt source destination
REJECT tcp -- anywhere anywhere tcp dpts:bootps:bootpc reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpts:bootps:bootpc reject-with icmp-port-unreachable
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere multiport dports netbios-ns,netbios-dgm,netbios-ssn
ACCEPT udp -- anywhere anywhere multiport dports netbios-ns,netbios-dgm,netbios-ssn
ACCEPT tcp -- anywhere 192.168.100.10 tcp dpt:ssh
ACCEPT tcp -- 192.168.100.10 anywhere tcp spt:ssh
ACCEPT tcp -- anywhere 192.168.100.10 tcp dpt:www
ACCEPT tcp -- 192.168.100.10 anywhere tcp spt:www
ACCEPT tcp -- anywhere 192.168.100.10 tcp dpt:smtp
ACCEPT tcp -- 192.168.100.10 anywhere tcp spt:smtp
ACCEPT tcp -- anywhere 192.168.100.10 tcp dpt:auth
ACCEPT tcp -- 192.168.100.10 anywhere tcp spt:auth
ACCEPT tcp -- anywhere 192.168.100.10 tcp dpt:imap2
ACCEPT tcp -- 192.168.100.10 anywhere tcp spt:imap2
ACCEPT tcp -- anywhere 192.168.100.10 tcp dpt:imaps
ACCEPT tcp -- 192.168.100.10 anywhere tcp spt:imaps
ACCEPT udp -- anywhere 192.168.100.10 udp dpt:openvpn
ACCEPT udp -- 192.168.100.10 anywhere udp spt:openvpn
ACCEPT udp -- anywhere 192.168.100.10 udp dpt:1195
ACCEPT udp -- 192.168.100.10 anywhere udp spt:1195
ACCEPT tcp -- anywhere 192.168.100.20 tcp dpt:3980
ACCEPT tcp -- 192.168.100.20 anywhere tcp spt:3980
ACCEPT udp -- anywhere 192.168.100.20 udp dpt:3980
ACCEPT udp -- 192.168.100.20 anywhere udp spt:3980
ACCEPT tcp -- anywhere 192.168.100.20 tcp dpt:3981
ACCEPT tcp -- 192.168.100.20 anywhere tcp spt:3981
ACCEPT udp -- anywhere 192.168.100.20 udp dpt:3981
ACCEPT udp -- 192.168.100.20 anywhere udp spt:3981
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- *publicip* anywhere
ACCEPT all -- 192.168.100.1 anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain droplog (1 references)
target prot opt source destination
LOG all -- anywhere anywhere limit: avg 3/hour burst 5 LOG level info
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain fail2ban-ssh (0 references)
target prot opt source destination
Chain PREROUTING (policy ACCEPT 811K packets, 66M bytes)
pkts bytes target prot opt in out source destination
885 54468 DNAT tcp -- eth0 any anywhere anywhere tcp dpt:ssh to:192.168.100.10:22
2644 143K DNAT tcp -- eth0 any anywhere anywhere tcp dpt:www to:192.168.100.10:80
19 1056 DNAT tcp -- eth0 any anywhere anywhere tcp dpt:smtp to:192.168.100.10:25
274 14444 DNAT tcp -- eth0 any anywhere anywhere tcp dpt:auth to:192.168.100.10:113
0 0 DNAT tcp -- eth0 any anywhere anywhere tcp dpt:imap2 to:192.168.100.10:143
4367 227K DNAT tcp -- eth0 any anywhere anywhere tcp dpt:imaps to:192.168.100.10:993
39 1755 DNAT udp -- eth0 any anywhere anywhere udp dpt:openvpn to:192.168.100.10:1194
15960 670K DNAT udp -- eth0 any anywhere anywhere udp dpt:1195 to:192.168.100.10:1195
4 208 DNAT tcp -- eth0 any anywhere anywhere tcp dpt:3980 to:192.168.100.20:3980
3 93 DNAT udp -- eth0 any anywhere anywhere udp dpt:3980 to:192.168.100.20:3980
1 52 DNAT tcp -- eth0 any anywhere anywhere tcp dpt:3981 to:192.168.100.20:3981
2 62 DNAT udp -- eth0 any anywhere anywhere udp dpt:3981 to:192.168.100.20:3981
Chain POSTROUTING (policy ACCEPT 25472 packets, 1365K bytes)
pkts bytes target prot opt in out source destination
587K 45M MASQUERADE all -- any eth0 192.168.100.0/24 anywhere
0 0 MASQUERADE all -- any eth1 10.10.0.0/24 anywhere
Chain OUTPUT (policy ACCEPT 1274 packets, 253K bytes)
pkts bytes target prot opt in out source destination
I can ping from clients to server, but not from client to client. Not with any client.
Note: there are two VPN-networks here. This new one is in port 58000, not 1194.