본문 바로가기
서버/리눅스 서버

WD MyCloud GEN1 클린 데비안 , UPNP 포트포워딩 - 4편

by ㅋㅋ잠자 2018. 4. 19.
반응형

안녕하세요?


이번에는 공유기 설정창에서 포트포워딩이 아니라 기기 자체에서 명령으로 포트포워딩하는 방법에 대해서 알아보도록 하겠습니다.


이 패키지는 U5PVR 용으로 만들어 둔 것으로 마클도 armhf 라 호환이 됩니다.







1. 설치하기


root@MyCloud:~# wget http://u5pvr.djjproject.com/u5pvr-upnp-port-forward.deb
--2018-04-19 17:09:57--  http://u5pvr.djjproject.com/u5pvr-upnp-port-forward.deb
Resolving u5pvr.djjproject.com (u5pvr.djjproject.com)... 58.123.71.137
Connecting to u5pvr.djjproject.com (u5pvr.djjproject.com)|58.123.71.137|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 68328174 (65M) [application/x-debian-package]
Saving to: `u5pvr-upnp-port-forward.deb'

100%[=============================================================>] 68,328,174  7.19M/s   in 9.5s   

2018-04-19 17:10:07 (6.86 MB/s) - `u5pvr-upnp-port-forward.deb' saved [68328174/68328174]

root@MyCloud:~# dpkg -i u5pvr-upnp-port-forward.deb
Selecting previously unselected package u5pvr-upnp-port-forward.
(Reading database ... 17877 files and directories currently installed.)
Unpacking u5pvr-upnp-port-forward (from u5pvr-upnp-port-forward.deb) ...
Setting up u5pvr-upnp-port-forward (1.0-android7) ...





2. 사용해보기


토렌트 포트를 오픈해 보겠습니다.


root@MyCloud:~# port 9091 50000 tcp
17:29:26.485 [main] INFO  org.chris.portmapper.PortMapperCli - Creating router factory for class org.chris.portmapper.router.cling.ClingRouterFactory
17:29:26.533 [main] DEBUG org.chris.portmapper.PortMapperCli - Creating a new instance of the router factory class class org.chris.portmapper.router.cling.ClingRouterFactory
17:29:26.744 [main] INFO  org.chris.portmapper.PortMapperCli - Searching for routers...
17:29:26.746 [main] DEBUG o.c.p.r.cling.ClingRouterFactory - System property 'portmapper.locationUrl' not defined: discover routers automatically.
17:29:27.013 [main] INFO  org.fourthline.cling.UpnpServiceImpl - >>> Starting UPnP service...
17:29:27.015 [main] INFO  org.fourthline.cling.UpnpServiceImpl - Using configuration: org.fourthline.cling.DefaultUpnpServiceConfiguration
17:29:27.150 [main] INFO  o.fourthline.cling.transport.Router - Creating Router: org.fourthline.cling.transport.RouterImpl
17:29:27.222 [main] INFO  o.f.c.t.spi.MulticastReceiver - Creating wildcard socket (for receiving multicast datagrams) on port: 1900
17:29:27.245 [main] INFO  o.f.c.t.spi.MulticastReceiver - Joining multicast group: /239.255.255.250:1900 on network interface: eth0
17:29:27.375 [main] INFO  o.f.cling.transport.spi.StreamServer - Created server (for receiving TCP streams) on: /192.168.0.150:45051
17:29:27.389 [main] INFO  o.f.cling.transport.spi.DatagramIO - Creating bound socket (for datagram input/output) on: /192.168.0.150
17:29:27.452 [main] INFO  org.fourthline.cling.UpnpServiceImpl - <<< UPnP service started successfully
17:29:27.457 [main] DEBUG o.c.p.r.cling.ClingRouterFactory - Start searching using upnp service
17:29:30.513 [cling-11] WARN  o.f.c.b.xml.DeviceDescriptorBinder - Unsupported UDA minor version, ignoring: 1
17:29:31.042 [cling-7] WARN  o.f.c.p.RetrieveRemoteDescriptors - Service descriptor retrieval failed: http://192.168.0.3:8008/ssdp/notfound, 404 Not Found
17:29:31.045 [cling-7] WARN  o.f.c.p.RetrieveRemoteDescriptors - Skipping invalid service '(RemoteService) Descriptor: /ssdp/notfound' of: (RemoteDevice) Identity: (RemoteDeviceIdentity) UDN: uuid:e279ebb4-1833-ce1e-54ee-9b7f220a11cd, Descriptor: http://192.168.0.3:8008/ssdp/device-desc.xml, Root: true
17:29:31.157 [cling-35] DEBUG o.c.p.r.cling.ClingRegistryListener - Found service of wrong type urn:dial-multiscreen-org:device:dial:1, expected urn:schemas-upnp-org:device:InternetGatewayDevice:1.
17:29:32.031 [cling-54] DEBUG o.c.p.r.cling.ClingRegistryListener - Found service of wrong type urn:schemas-upnp-org:device:MediaServer:1, expected urn:schemas-upnp-org:device:InternetGatewayDevice:1.
17:29:32.051 [cling-56] DEBUG o.c.p.r.cling.ClingRegistryListener - Found service of wrong type urn:schemas-upnp-org:device:MediaServer:1, expected urn:schemas-upnp-org:device:InternetGatewayDevice:1.
17:29:32.056 [cling-50] DEBUG o.c.p.r.cling.ClingRegistryListener - Found service of wrong type urn:schemas-upnp-org:device:MediaServer:1, expected urn:schemas-upnp-org:device:InternetGatewayDevice:1.
17:29:32.114 [cling-50] DEBUG o.c.p.r.cling.ClingRegistryListener - Found service of wrong type urn:schemas-upnp-org:device:MediaServer:1, expected urn:schemas-upnp-org:device:InternetGatewayDevice:1.
17:29:32.181 [cling-42] DEBUG o.c.p.r.cling.ClingRegistryListener - Found service of wrong type urn:schemas-upnp-org:device:MediaServer:1, expected urn:schemas-upnp-org:device:InternetGatewayDevice:1.
17:29:32.191 [cling-41] DEBUG o.c.p.r.cling.ClingRegistryListener - Found service of wrong type urn:schemas-upnp-org:device:MediaServer:1, expected urn:schemas-upnp-org:device:InternetGatewayDevice:1.
17:29:32.205 [cling-49] DEBUG o.c.p.r.cling.ClingRegistryListener - Found 1 devices
17:29:32.208 [cling-49] DEBUG o.c.p.r.cling.ClingRegistryListener - Device (RemoteDevice) Identity: (RemoteDeviceIdentity) UDN: uuid:fc4ec57e-b051-11db-88f8-0060085db3f6, Descriptor: http://192.168.0.1:55888/etc/linuxigd/gatedesc.xml, Root: false supports ip service type: (RemoteService) Descriptor: /etc/linuxigd/gateconnSCPD.xml
17:29:32.209 [cling-49] DEBUG o.c.p.r.cling.ClingRegistryListener - Found connection service (RemoteService) Descriptor: /etc/linuxigd/gateconnSCPD.xml
17:29:32.211 [main] DEBUG o.c.p.r.cling.ClingRouterFactory - Found service (RemoteService) Descriptor: /etc/linuxigd/gateconnSCPD.xml
17:29:32.238 [main] INFO  org.chris.portmapper.PortMapperCli - Connected to router UPnP d 20090617
17:29:32.245 [main] INFO  org.chris.portmapper.PortMapperCli - Adding mapping PortMapper TCP/192.168.0.150:9091
17:29:32.324 [cling-47] DEBUG o.c.p.r.cling.ClingRegistryListener - Found service of wrong type urn:schemas-upnp-org:device:HiMultiScreenServerDevice:1, expected urn:schemas-upnp-org:device:InternetGatewayDevice:1.
17:29:32.346 [cling-47] DEBUG o.c.p.r.cling.ClingRegistryListener - Found service of wrong type urn:schemas-upnp-org:device:MediaRenderer:1, expected urn:schemas-upnp-org:device:InternetGatewayDevice:1.
17:29:32.478 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 0...
17:29:32.563 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 1...
17:29:32.596 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 2...
17:29:32.633 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 3...
17:29:32.668 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 4...
17:29:32.701 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 5...
17:29:32.736 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 6...
17:29:32.770 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 7...
17:29:32.802 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 8...
17:29:32.835 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 9...
17:29:32.868 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 10...
17:29:32.900 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 11...
17:29:32.930 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 12...
17:29:32.962 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 13...
17:29:33.032 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 14...
17:29:33.063 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 15...
17:29:33.094 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 16...
17:29:33.123 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 17...
17:29:33.152 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 18...
17:29:33.178 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 19...
17:29:33.208 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 20...
17:29:33.238 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 21...
17:29:33.266 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 22...
17:29:33.297 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 23...
17:29:33.325 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 24...
17:29:33.351 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 25...
17:29:33.376 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 26...
17:29:33.403 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 27...
17:29:33.446 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 28...
17:29:33.473 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 29...
17:29:33.501 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 30...
17:29:33.525 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 31...
17:29:33.551 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 32...
17:29:33.576 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 33...
17:29:33.603 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 34...
17:29:33.626 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 35...
17:29:33.651 [main] DEBUG o.c.p.r.c.ClingPortMappingExtractor - Getting port mapping with entry number 36...
17:29:33.685 [main] INFO  o.c.p.r.c.ClingPortMappingExtractor - Got error response when fetching port mapping for entry number 36: '(IncomingActionResponseMessage) 500 Internal Server Error'. Stop getting more entries.
17:29:33.688 [main] INFO  org.chris.portmapper.PortMapperCli - Found 36 port forwardings:
TCP :46468 -> 192.168.0.2:46468 enabled Network/Downloader at 192.168.0.2:46468
UDP :46468 -> 192.168.0.2:46468 enabled Network/Downloader at 192.168.0.2:46468
TCP :19101 -> 192.168.0.2:19101 enabled ZettamediaBoxService 00-25-22-12-80-5A
UDP :43002 -> 192.168.0.2:43002 enabled v-grid
TCP :43002 -> 192.168.0.2:43002 enabled v-grid
UDP :9000 -> 192.168.0.2:9000 enabled Ubisoft 00-25-22-12-80-5A
TCP :3224 -> 192.168.0.16:3224 enabled Network/Service at 192.168.0.16:3224
UDP :3224 -> 192.168.0.16:3224 enabled Network/Service at 192.168.0.16:3224
TCP :65004 -> 192.168.0.16:65004 enabled Network/Service at 192.168.0.16:65004 /a
UDP :65004 -> 192.168.0.16:65004 enabled Network/Service at 192.168.0.16:65004 /a
TCP :65003 -> 192.168.0.16:65003 enabled Network/Service at 192.168.0.16:65003 /p
UDP :65003 -> 192.168.0.16:65003 enabled Network/Service at 192.168.0.16:65003 /p
UDP :59599 -> 192.168.0.16:59599 enabled supdate/0.15.10.0 at 192.168.0.16:59599
TCP :59599 -> 192.168.0.16:59599 enabled supdate/0.15.10.0 at 192.168.0.16:59599
TCP :11556 -> 192.168.0.21:8195 enabled PiXel
UDP :9001 -> 192.168.0.2:9000 enabled Ubisoft 00-25-22-12-80-5A
TCP :45905 -> 192.168.0.16:45905 enabled Network/Downloader at 192.168.0.16:45905
UDP :45905 -> 192.168.0.16:45905 enabled Network/Downloader at 192.168.0.16:45905
TCP :9091 -> 192.168.0.40:80 enabled WD2go
TCP :9444 -> 192.168.0.40:443 enabled WD2goSSL
TCP :7924 -> 192.168.0.24:7924 enabled CCDN/2.0.1.21.c at 192.168.0.24:7924
TCP :4433 -> 192.168.0.24:4433 enabled CCDN/2.0.1.21.c at 192.168.0.24:4433
UDP :7924 -> 192.168.0.24:7924 enabled CCDN/2.0.1.21.c at 192.168.0.24:7924
TCP :54025 -> 192.168.0.20:54025 enabled Resilio Sync (TCP)
UDP :54025 -> 192.168.0.20:54025 enabled Resilio Sync (UDP)
UDP :52879 -> 192.168.0.20:52879 enabled Teredo
TCP :12000 -> 192.168.0.18:12000 enabled DaumNPP
TCP :12001 -> 192.168.0.18:12001 enabled DaumNPP
TCP :12002 -> 192.168.0.18:12002 enabled DaumNPP
TCP :12003 -> 192.168.0.18:12003 enabled DaumNPP
TCP :12008 -> 192.168.0.20:12008 enabled DaumNPP
TCP :12009 -> 192.168.0.20:12009 enabled DaumNPP
TCP :12010 -> 192.168.0.20:12010 enabled DaumNPP
TCP :12011 -> 192.168.0.20:12011 enabled DaumNPP
TCP :22335 -> 192.168.0.150:22 enabled PortMapper TCP/192.168.0.150:22
TCP :50000 -> 192.168.0.150:9091 enabled PortMapper TCP/192.168.0.150:9091
17:29:33.689 [main] DEBUG o.c.p.router.cling.ClingRouter - Shutdown registry


그러면 9091 포트가 50000번 포트로 포워딩 됩니다.


사용방법은 아래와 같습니다.


port internalport externalport protocol

dport externalport protocol


감사합니다.

반응형

댓글