ตอนนี้เพิ่งทำ VPN ครับ ใช้ pfsense ปัญหาคือ เมื่อเชื่อม VPN ด้วย Open VPN แล้ว ไม่สามารถเข้า SAMBA ได้ ping ไม่เจอด้วยครับ OS เป็น CentOS ครับ แต่ Server เครื่องอื่นๆ เข้าใช้ได้ตามปกติครับ ใครเคยเจอปัญหานี้ รบกวนหน่อยครับ
Announcement
Collapse
No announcement yet.
สอบถามเรื่อง VPN ครับ
Collapse
X
-
เครื่องที่คุณใช้ Ping ไปหา SAMBA (CentOS Server) ถ้าเป็น Windows ให้ลองปิด Firewall ก่อน ต่อจากนั้นลองทำการ Ping ไปหา SAMBA Server (CentOS Server) อีกครั้งOriginally posted by Naklengcom View Postลอง เปิดทุก port หมดแล้วก็ยังไม่ได้ครับ
ส่วนการใช้ OpenVPN ไม่ทราบว่าคุณเปิด Ports และกำหนดกฎไฟร์วอลล์อย่างไรบ้าง อย่างเช่น ที่ Firewall >ที่แท็บ LAN, WAN, OpenVPN
ที่ OpenVPN Server ที่ NetBIOS Options .ให้ใส่เครื่องหมายถูกที่ Enable NetBIOS over TCP/IP และ Node type เป็น h-node และ WINS Server ใส่เครื่องหมายถูกที่ Provide a WINS server list to clients
จากนั้นใส่หมายเลขไอพีแอดเดรสของ SAMBA ลงไป
ที่ CentOS ลองเปิดพอร์ต Ports เหล่านี้
netbios-ns TCP port 137
netbios-ns UDP port 137
netbios-dgm TCP port 138
netbios-dgm UDP port 138
netbios-ssn TCP port 139
netbios-ssn UDP port 139
microsoft-ds TCP port 445
LDAP TCP port 389
========================================
Ports ที่ Samba ใช้เมื่อทำหน้าเป็น Domain Controller
DNS 53 tcp/udp
Kerberos 88 tcp/udp
End Point Mapper (DCE/RPC Locator Service) 135 tcp
NetBIOS Name Service 137 udp
NetBIOS Datagram 138 udp
NetBIOS Session 139 tcp
LDAP 389 tcp/udp
SMB over TCP 445 tcp
Kerberos kpasswd 464 tcp/udp
LDAPS (only if "tls enabled = yes") 636 tcp
Dynamic RPC Ports* 1024-5000 tcp
Global Cataloge 3268 tcp
Global Cataloge SSL (only if "tls enabled = yes") 3269 tcp
Multicast DNS 5353 tcp/udp
======================================
ที่ RHEL/CentOS Server ลองพิมพ์คำสั่ง:
$ grep -i NETBIOS /etc/services
ตัวอย่าง Outputs:
netbios-ns 137/tcp # NETBIOS Name Service
netbios-ns 137/udp
netbios-dgm 138/tcp # NETBIOS Datagram Service
netbios-dgm 138/udp
netbios-ssn 139/tcp # NETBIOS session service
netbios-ssn 139/udp
ต่อมาให้แก้ใขดังนี้
สมมุติว่า Samba มีการใช้งาน 192.168.10.0/24 Subnet
Edit /etc/sysconfig/iptables
จากนั้นที่ RHEL/CentOS Server ให้เพิ่มบรรทัดเหล่านี้เข้าไปใหม่ก่อนบรรทัดสุดท้ายของ LOG และ ROP ให้กับ RH-Firewall-1-INPUT Chain:
-A RH-Firewall-1-INPUT -s 192.168.10.0/24 -m state --state NEW -p tcp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.10.0/24 -m state --state NEW -p tcp --dport 138 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.10.0/24 -m state --state NEW -p tcp --dport 139 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.10.0/24 -m state --state NEW -p tcp --dport 445 -j ACCEPT
เสร็จแล้วทำการ Save และปิดไฟล์ดังกล่าว และให้ทำการ Restart firewall Service อีกครั้ง:
# /sbin/services iptables restart
ลองทดสอบตามรุปภาพดูนะผมไม่แน่ใจว่าใช่ได้หรือเปล่า
OpenVPN Server ที่ Client Setting.jpg
NoppyLast edited by Noppy; 11 Aug 2013, 06:06:39.
Comment
-
อยากทราบว่าใช้ OpenVPN เชื่อมต่อกันแบบใหนครับ อย่างเช่น Site to Site , Multiple Site to Site หรือ Road Warrior (Laptop)Client to OpenVPN Server SiteOriginally posted by Naklengcom View Postได้ครับผม ขอบคุณมากครับ
แก้ไขค่าคอนฟิกใหม่ดังรูป
OpenVPN Server ที่ Client Setting2.jpg
ทำตามนี้
สมมุติว่า
1. LAN ใช้ subnet 192.168.10.0/24,
2. VPN Tunnel Subnet 172.16.16.0/24
3. Samba Server ใช้ IP address of 192.168.10.10
ที่ SAMBA Server
แก้ใข Samba Configuration File (smb.conf). ให้พิมพ์ดังนี้
hosts allow = 192.168.10.0/24 172.16.16.0/24 127.0.0.1
แล้วทำการ Save และรีบูต SAMBA ServerLast edited by Noppy; 12 Aug 2013, 14:18:57.
Comment
-
ทำตามนี้Originally posted by Naklengcom View PostRoad Warrior ครับ เดี่ยววันอังคารหรือวันพุทธ จะเข้าไปทำแล้วจะมาแจ้งผลครับ
สมมุติว่า
1. LAN ใช้ subnet 192.168.10.0/24,
2. VPN Tunnel Subnet 172.16.16.0/24
3. Samba Server ใช้ IP address of 192.168.10.10
ที่ SAMBA Server
แก้ใข Samba Configuration File (smb.conf). ให้พิมพ์ดังนี้
hosts allow = 192.168.10.0/24 172.16.16.0/24 127.0.0.1
แล้วทำการ Save และรีบูต SAMBA ServerLast edited by Noppy; 11 Aug 2013, 05:21:15.
Comment
Comment