Всем привет.
Описание ситуации. Есть Samba4, поднятая как контроллер домена. Есть необходимость подключится к нему с удалённой виндовой машины через RSAT. Для этого на той же машине организована связка openswan+xl2tpd. Подключение устанавливается, с виндовой машины компы в офисе пингуются все, но DNS-сервер самбы не виден. Чую, что неправильно настроил маршрутизацию, но как правильно сделать, не знаю. Конфиги и логи под катом.
iptables.rules:
# Generated by iptables-save v1.6.0 on Sat Jul 9 16:02:16 2016
*nat
:PREROUTING ACCEPT [66:5519]
:INPUT ACCEPT [56:4858]
:OUTPUT ACCEPT [110:8910]
:POSTROUTING ACCEPT [110:8910]
-A POSTROUTING -s 192.168.14.0/24 -j MASQUERADE
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
COMMIT
xl2tpd.conf
[global]
auth file = /etc/xl2tpd/l2tp-secrets
port=1701
[lns ad.mikh.loc]
ip range = 192.168.14.10-192.168.14.20
local ip = 192.168.13.1
refuse chap = yes
refuse pap = yes
require authentication = yes
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
exclusive = no
assign ip = yes
name = VPN-Server
lac = 0.0.0.0-255.255.255.255
options.xl2tpd
#refuse-mschap-v2
#refuse-mschap
ms-dns 192.168.81.3
ms-dns 8.8.8.8
ipcp-accept-local
ipcp-accept-remote
#defaultroute
asyncmap 0
auth
#crtscts
idle 1800
#mtu 1200
#mru 1200
#lock
hide-password
#local
debug
name l2tpd
#proxyarp
lcp-echo-interval 30
lcp-echo-failure 4
ipsec.conf
# /etc/ipsec.conf - Openswan IPsec configuration file
# This file: /usr/share/doc/openswan/ipsec.conf-sample
#
# Manual: ipsec.conf.5
version 2.0 # conforms to second version of ipsec.conf specification
# basic configuration
config setup
dumpdir=/var/run/pluto/
#
# NAT-TRAVERSAL support, see README.NAT-Traversal
nat_traversal=yes
#virtual_private=%v4:192.168.81.0/24,%v4:192.168.80.0/24
virtual_private=%v4:0.0.0.0/0
protostack=netkey
listen=192.168.81.3
conn L2TP-PSK-NAT
rightsubnet=vhost:%priv
also=L2TP-PSK-noNAT
conn L2TP-PSK-noNAT
authby=secret # Auth with PSK ( preshared key )
forceencaps=yes
pfs=no
auto=add
keyingtries=3
rekey=no
dpddelay=30
dpdtimeout=120
dpdaction=clear
ikelifetime=8h
salifetime=10m
type=tunnel
left=192.168.81.3
leftsubnet=192.168.81.0/24
leftnexthop=192.168.81.1
leftprotoport=17/%any
right=%any
rightprotoport=17/%any
ipsec verify
Checking if IPsec got installed and started correctly:
Version check and ipsec on-path [OK]
Openswan U2.6.47/K4.6.3-1-ARCH (netkey)
See `ipsec --copyright' for copyright information.
Checking for IPsec support in kernel [OK]
NETKEY: Testing XFRM related proc values
ICMP default/send_redirects [OK]
ICMP default/accept_redirects [OK]
XFRM larval drop [OK]
Hardware random device check [N/A]
Two or more interfaces found, checking IP forwarding [OK]
Checking rp_filter [ENABLED]
/proc/sys/net/ipv4/conf/all/rp_filter [ENABLED]
/proc/sys/net/ipv4/conf/default/rp_filter [ENABLED]
/proc/sys/net/ipv4/conf/enp1s5/rp_filter [ENABLED]
/proc/sys/net/ipv4/conf/ppp0/rp_filter [ENABLED]
Checking that pluto is running [OK]
Pluto listening for IKE on udp 500 [OK]
Pluto listening for IKE on tcp 500 [NOT IMPLEMENTED]
Pluto listening for IKE/NAT-T on udp 4500 [OK]
Pluto listening for IKE/NAT-T on tcp 4500 [NOT IMPLEMENTED]
Pluto listening for IKE on tcp 10000 (cisco) [NOT IMPLEMENTED]
Checking NAT and MASQUERADEing [TEST INCOMPLETE]
Checking 'ip' command [OK]
Checking 'iptables' command [OK]
netstat -natup (Без ipv6) #сервер
tcp 0 0 0.0.0.0:10001 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:8082 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:88 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:636 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:1024 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:12001 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:3268 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:3269 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:389 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:135 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:464 0.0.0.0:* LISTEN
udp 0 0 0.0.0.0:53 0.0.0.0:* -
udp 0 0 192.168.81.3:88 0.0.0.0:* -
udp 0 0 0.0.0.0:88 0.0.0.0:* -
udp 0 0 192.168.13.1:123 0.0.0.0:* -
udp 0 0 192.168.81.3:123 0.0.0.0:* -
udp 0 0 127.0.0.1:123 0.0.0.0:* -
udp 0 0 0.0.0.0:123 0.0.0.0:* -
udp 0 0 192.168.81.3:137 0.0.0.0:* -
udp 0 0 192.168.81.255:137 0.0.0.0:* -
udp 0 0 0.0.0.0:137 0.0.0.0:* -
udp 0 0 192.168.81.3:138 0.0.0.0:* -
udp 0 0 192.168.81.255:138 0.0.0.0:* -
udp 0 0 0.0.0.0:138 0.0.0.0:* -
udp 0 0 0.0.0.0:1701 0.0.0.0:* -
udp 0 0 0.0.0.0:5355 0.0.0.0:* -
udp 0 0 192.168.81.3:389 0.0.0.0:* -
udp 0 0 0.0.0.0:389 0.0.0.0:* -
udp 0 0 192.168.81.3:4500 0.0.0.0:* -
udp 0 0 192.168.81.3:464 0.0.0.0:* -
udp 0 0 0.0.0.0:464 0.0.0.0:* -
udp 0 0 192.168.81.3:500 0.0.0.0:* -
netstat -a #клиент
Имя Локальный адрес Внешний адрес Состояние
TCP 0.0.0.0:135 TERM1:0 LISTENING
TCP 0.0.0.0:445 TERM1:0 LISTENING
TCP 0.0.0.0:1536 TERM1:0 LISTENING
TCP 0.0.0.0:1537 TERM1:0 LISTENING
TCP 0.0.0.0:1538 TERM1:0 LISTENING
TCP 0.0.0.0:1539 TERM1:0 LISTENING
TCP 0.0.0.0:1540 TERM1:0 LISTENING
TCP 0.0.0.0:1541 TERM1:0 LISTENING
TCP 0.0.0.0:1542 TERM1:0 LISTENING
TCP 0.0.0.0:5357 TERM1:0 LISTENING
TCP 0.0.0.0:7680 TERM1:0 LISTENING
TCP 10.0.2.15:139 TERM1:0 LISTENING
TCP 192.168.14.10:139 TERM1:0 LISTENING
UDP 0.0.0.0:500 *:*
UDP 0.0.0.0:1701 *:*
UDP 0.0.0.0:3544 *:*
UDP 0.0.0.0:3702 *:*
UDP 0.0.0.0:3702 *:*
UDP 0.0.0.0:3702 *:*
UDP 0.0.0.0:3702 *:*
UDP 0.0.0.0:3702 *:*
UDP 0.0.0.0:3702 *:*
UDP 0.0.0.0:4500 *:*
UDP 0.0.0.0:5353 *:*
UDP 0.0.0.0:5355 *:*
UDP 0.0.0.0:49737 *:*
UDP 0.0.0.0:50861 *:*
UDP 0.0.0.0:55265 *:*
UDP 10.0.2.15:137 *:*
UDP 10.0.2.15:138 *:*
UDP 10.0.2.15:1900 *:*
UDP 10.0.2.15:49794 *:*
UDP 127.0.0.1:1900 *:*
UDP 127.0.0.1:49796 *:*
UDP 192.168.14.10:137 *:*
UDP 192.168.14.10:138 *:*
UDP 192.168.14.10:1900 *:*
UDP 192.168.14.10:49795 *:*
UDP 192.168.14.10:61591 *:*
sudo nmap -sS -sU -T4 -A -v \
-p 135,445,1536,1537,1538,1539,1540,1541,1542,5357,7680,139,500,1701,3544,3702,5353,5355 \
192.168.14.10
PORT STATE SERVICE VERSION
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows 98 netbios-ssn
445/tcp open microsoft-ds Microsoft Windows 10 microsoft-ds
500/tcp closed isakmp
1536/tcp open msrpc Microsoft Windows RPC
1537/tcp open msrpc Microsoft Windows RPC
1538/tcp open msrpc Microsoft Windows RPC
1539/tcp open msrpc Microsoft Windows RPC
1540/tcp open msrpc Microsoft Windows RPC
1541/tcp open msrpc Microsoft Windows RPC
1542/tcp open msrpc Microsoft Windows RPC
1701/tcp closed l2f
3544/tcp closed unknown
3702/tcp closed unknown
5353/tcp closed mdns
5355/tcp closed unknown
5357/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-server-header: Microsoft-HTTPAPI/2.0
|_http-title: Service Unavailable
7680/tcp open unknown
135/udp closed msrpc
139/udp closed netbios-ssn
445/udp closed microsoft-ds
500/udp open|filtered isakmp
1536/udp closed ampr-inter
1537/udp closed sdsc-lm
1538/udp closed 3ds-lm
1539/udp open|filtered intellistor-lm
1540/udp closed rds
1541/udp closed rds2
1542/udp closed gridgen-elmd
1701/udp open|filtered L2TP
3544/udp open|filtered teredo
3702/udp open|filtered ws-discovery
5353/udp open|filtered zeroconf
5355/udp open|filtered llmnr
5357/udp closed wsdapi
7680/udp closed pando-pub
Заранее спасибо.