どうもみむらです。
VPN 越しに NAS のコンテンツに、しかも DLNA 対応アプリ経由で触りたいと思ったことはありませんか。
数ヶ月前に NAS を購入して、速攻で静音化の記事 ( ASUSTOR DataSync Center の HDD アクセスを静かにする ) を書いたりしていたのですが、DLNA 経由で音楽ファイルに触れるようにしてみた所これが大変使いやすく、ぜひ VPN 越しにもこれを享受したい・・と。。
DLNA は UPnP を用いており、その機器発見に SSDP (1900/udp) を用いているのですが、早い話が VPN 越しにブロードキャストが上手く動作しないので、これを改善してみようというそういう話です。
1.サーバから VPN 感を感じ取れないようにする
DLNA は同一ネットワーク上での動作を想定しているものになります。
他のネットワークからアクセスしようとすると上手く動いてくれないケースがいくつか見られましたので、下記のようにしてサーバからの 「VPN 感」を少し消してみます。

NAS 側には “192.168.1.0/24” のネットワークに属しているように見せ、VPN 用に “192.168.1.224/28” のネットワークを用意しておきます。
VPN サーバには Proxy ARP の設定を入れて、192.168.1.0/24 のネットワーク上からも 192.168.1.224/28 の端末の MAC アドレスの解決 (といっても VPN サーバが指し示されるだけ)が出来るようになります。
なお、Proxy ARP については、こちらのサイトが詳しいですので参照ください:
Proxy ARP(プロキシARP)とは / ネットワークエンジニアとして
https://www.infraexpert.com/study/gateway.htm
具体的な設定方法としては
“/proc/sys/net/ipv4/conf/<device>/proxy_arp” を 1 に書き換えるか
systemd-networkd の “[Network]” セクションに “IPv4ProxyARP=yes” とする方法が
簡単かなと思います。
設定する際は、“192.168.1.0/24” の方に ProxyARP の設定を適用する形になります。
systemd-networkd の設定例)
# cat /etc/systemd/network/eth0.network
[Match]
Name=eth0
[Network]
Address=192.168.1.240/24
Gateway=192.168.1.254
IPv4ProxyARP=yes
# cat /etc/systemd/network/eth1.network
[Match]
Name=eth1
[Network]
Address=192.168.1.238/28
[Link]
MTUBytes=12002. SSDP をプロキシする
探索プロトコルの通信を転送するようにしてみます。
転送しないと探索が VPN のネットワーク内で閉じてしまい、本来の機器まで届かなくなってしまいます。
SSDP の中身は概ね下記のような HTTP ベースの通信になっています。
# リクエストの例。(クライアントからサーバに対して送る)
# 239.255.255.250:1900/UDP に対して送出される
---
M-SEARCH * HTTP/1.1
MX: 5
ST: urn:schemas-upnp-org:device:MediaServer:1
MAN: "ssdp:discover"
User-Agent: UPnP/1.0
Host: 239.255.255.250:1900
Connection: close
---
# 応答例。
# サーバからリクエストを行ったクライアントのポートに対してユニキャストで応答が入る
---
HTTP/1.1 200 OK
Cache-Control: max-age=1800
EXT:
Location: http://192.168.1.22:55247/dms
Server: Linux 4.0.0 UPnP/1.0
ST: urn:schemas-upnp-org:device:MediaServer:1
USN: uuid:xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx::urn:schemas-upnp-org:device:MediaServer:1
Date: Sun, 16 May 2021 19:42:50 GMT
---見ていただくとわかるように、応答の中にユニキャストアドレスが含まれているため、発見処理のみプロキシしてあげれば後は1対1での通信となります。
ということで下記のようなプログラムを書いてみました
#!/bin/python3
#
# SSDP (DLNA の探索プロトコル) を吸って吐くプロキシ。
# Wireguard のように純粋にbridgeできないネットワーク間で使うと幸せになれる気がします。
# (使ったことでネットワークがダウン等しても保証は出来ませんので、自己責任でどうぞ。)
#
# Author : Satoshi Mimura (@mimura1133)
#
import socket
from contextlib import closing
def main():
multicast_group = '239.255.255.250'
src_adapter_ip = '' # DLNA クライアントがいるネットワークの IP アドレスを指定
dst_adapter_ip = '' # DLNA サーバがいるネットワークの IP アドレスを指定
port = 1900
timeout = 5.0
with closing(socket.socket(socket.AF_INET,socket.SOCK_DGRAM)) as src_sock:
src_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR,1)
src_sock.bind(('',port))
src_sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP,
socket.inet_aton(multicast_group) + socket.inet_aton(src_adapter_ip))
while True:
request_data, client_addr = src_sock.recvfrom(4096)
with closing(socket.socket(socket.AF_INET,socket.SOCK_DGRAM)) as dst_sock:
dst_sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_IF, socket.inet_aton(dst_adapter_ip))
dst_sock.settimeout(timeout)
dst_sock.sendto(request_data,(multicast_group,port))
print("\033[31m [FORWARDED:REQUEST]\033[0m {} -> {}".format(client_addr,(multicast_group,port)))
print(request_data)
while True:
try:
response_data, server_addr = dst_sock.recvfrom(4096)
src_sock.sendto(response_data,client_addr)
print("\033[32m [FORWARDED:RESPONSE]\033[0m {} -> {}".format(server_addr,client_addr))
print(response_data)
except Exception:
break
return
if __name__ == '__main__':
main()動かしてみた結果は下図の通り。中々上手く動いてます。


3.永続化する
毎回手動で起動するのは筋がよくありませんので、systemd のサービスにしてしまいましょう。
まずは、先ほどの Proxy をするプログラムからデバッグ用の print 文を消去したものを準備します。
#!/bin/python3
#
# SSDP (DLNA の探索プロトコル) を吸って吐くプロキシ。
# Wireguard のように純粋にbridgeできないネットワーク間で使うと幸せになれる気がします。
# (使ったことでネットワークがダウン等しても保証は出来ませんので、自己責任でどうぞ。)
#
# Author : Satoshi Mimura (@mimura1133)
#
import socket
from contextlib import closing
def main():
multicast_group = '239.255.255.250'
src_adapter_ip = '' # DLNA クライアントがいるネットワークの IP アドレスを指定
dst_adapter_ip = '' # DLNA サーバがいるネットワークの IP アドレスを指定
port = 1900
timeout = 5.0
with closing(socket.socket(socket.AF_INET,socket.SOCK_DGRAM)) as src_sock:
src_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR,1)
src_sock.bind(('',port))
src_sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP,
socket.inet_aton(multicast_group) + socket.inet_aton(src_adapter_ip))
while True:
request_data, client_addr = src_sock.recvfrom(4096)
with closing(socket.socket(socket.AF_INET,socket.SOCK_DGRAM)) as dst_sock:
dst_sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_IF, socket.inet_aton(dst_adapter_ip))
dst_sock.settimeout(timeout)
dst_sock.sendto(request_data,(multicast_group,port))
while True:
try:
response_data, server_addr = dst_sock.recvfrom(4096)
src_sock.sendto(response_data,client_addr)
except Exception:
break
return
if __name__ == '__main__':
main()上記を /usr/local/sbin/proxy_dlna.py として保存しておきます。
保存が完了したら下記のように systemd のサービスを作成します。
今回は下記の内容を /etc/systemd/system/proxy_dlna.service として作成しました。
[Unit]
Description=Launch DLNA Proxy (/usr/local/sbin/proxy_dlna.py)
# After=wg-quick@wg0.service #WireGuard を使っている場合はこうしておくと WireGuard が起動した後に起動するようになります。
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/proxy_dlna.py
[Install]
WantedBy=multi-user.target保存が完了しましたら systemctl enable proxy_dlna 等で有効にすれば完了です。
手順は以上となります。
ただ上記のようなプロキシで全て動作するかというとそうではなく、特に DTCP-IP 等を用いるシステムの場合は「TTL は 3ホップ以下」「RTT は 7ms 以下」という制約が存在するため実現するのが大変難しい状況になっています。
もしそのような場合については NTT の NGN 網の特殊性を用いて回避しているケースや、L2TPv3 などを上手く組み合わせて回避しているケースがネット上にいくつか転がっていますのでそちらを用いるのが良いかなと思われます。
とはいえ、当方環境ではこれで VPN ライフがかなり改善されましたので、もしよろしければ参考にしていただけたらと!
https://independent-panda-s4606b.mystrikingly.com/blog/74dd1a6a976
Always take into consideration the kinds of sleeves and straps you will have in your costume.
https://classic-blog.udn.com/dbea1afa/183851376
This style comes in a good selection of colours from neutrals and pastels to brights.
https://lhem2863.blogspot.com/2025/11/blog-post_7.html
But, if I might add some personal recommendation, ENJOY the journey and process of it.
https://telegra.ph/SEO-C5-09-17
There are many dressing options obtainable for each price range.
https://classic-blog.udn.com/482b615c/183914812
These gowns are chic and stylish with just a bit of an edge.
https://classic-blog.udn.com/bfa29f9e/183850619
We requested some wedding ceremony fashion consultants to determine what a MOB ought to put on on the large day.
https://sites.google.com/view/marketing-10-22-2025/page-6
From impartial off-white numbers to bold, punchy, and fashion-forward designs, there’s one thing here that will suit her fancy.
https://modest.neocities.org/my-first-article
Are you in search of mother of the bride gowns for summer seashore wedding?
https://classic-blog.udn.com/3ec95c77/184046377
Jovani provides you the highest highest quality MOB gowns for a low price.
https://telegra.ph/accounting-9-10-20
Our top-rated sizes vary from 00 – 32 to also embody petite products.
https://telegra.ph/SEO-3-10-31
A structured costume will all the time be flattering, especially one that nips you on the waist like this stylish frock from Amsale.
https://classic-blog.udn.com/70559d90/183718275
For example, you might go together with a lighter tone or darker shade of the color the bridesmaids are carrying.
https://classic-blog.udn.com/3e5f0d4b/183849827
Much like the mom of the groom, step-mothers of each the bride or groom ought to comply with the lead of the mother of the bride.
https://classic-blog.udn.com/0f0f3642/183727328
Gray is a sublime neutral that flatters every skin tone.
https://classic-blog.udn.com/ba8616ce/183759969
This additionally helps go away time for shipping in case the gown takes longer than anticipated to arrive.
https://classic-blog.udn.com/cf4190d9/184210253
The finest mom of the bride dresses fill you with confidence on the day and are snug enough to wear all day and into the night time.
https://classic-blog.udn.com/22a3c7e5/184445329
Then you’ll have the ability to view your saved listings every time you login.
https://classic-blog.udn.com/7c0e8875/184441782
Spring and summer season weddings name for gentle tones, floral motifs, and a romantic aptitude.
https://ameblo.jp/seth12ramirez/entry-12945372311.html
The bridesmaids at this at-home Kentucky wedding sparkled in gold-sequined mini dresses.
https://classic-blog.udn.com/6391d854/183962655
So, go forward, and let the natural shine of your gown communicate volume for you.
https://classic-blog.udn.com/8eb02d1c/184315438
Is your mum worried about displaying her upper arms on the big day?
https://classic-blog.udn.com/06b711d0/183811945
From Mother of the Bride clothes to separates to tailoring, you’ll find all of it here in our Mother of the Bride (or Groom!) collection.
https://ameblo.jp/laurawillis/entry-12948730760.html
If you’re in a pinch, many e-commerce sites like Net-a-Porter or Nordstrom supply rush transport.
https://classic-blog.udn.com/1a2500e3/184470067
For a mom, watching your daughter walk down the aisle and marry the love of her life is an unforgettable moment.
https://classic-blog.udn.com/8487ff40/184899131
You should go for some bright colours, or if your daughter has a color picked out for you then go along with that.
https://classic-blog.udn.com/41736157/184029749
As the mother of the bride, eyes might be on you virtually as a lot as they will be on the joyful couple.
https://classic-blog.udn.com/69dfaa61/184571714
At as soon as effortless and refined, this beautifully draped robe is the proper hue for a fall wedding.
https://sites.google.com/view/cateringking-24-10-2025/page-3?authuser=1
You might combine the monochrome twinset with white or black pants.
https://mypaper.pchome.com.tw/sarahcooper10/post/1382126084
“I said proper then I would wear it at some point,” she recalled.
https://classic-blog.udn.com/d3c8c38c/183825797
From Mother of the Bride clothes to separates to tailoring, you’ll find it all right here in our Mother of the Bride (or Groom!) collection.
https://classic-blog.udn.com/b0f9831a/183934922
This will complete your outfit and bring it together as a complete.
https://mypaper.pchome.com.tw/carterwashington/post/1382131888
This embellishment on this gorgeous gown provides a touch of magic good for any winter wedding ceremony.
https://classic-blog.udn.com/76bbd59c/184011533
The course of of selecting attire for the mother of the groom and mom of the bride is very comparable.
https://melissa2342.neocities.org/second-article
Use these as statement items, maybe in a brighter colour than the relaxation of the outfit.
https://classic-blog.udn.com/f5fafcd8/183950634
Purchases made by way of links on this web page could earn us a fee.
http://john399.wikidot.com/blog:5
Give them glitz and glam on this allover sequin stunner.
https://edward242.exblog.jp/35637342/
“I said proper then I would wear it at some point,” she recalled.
https://classic-blog.udn.com/76cb65cd/183954204
If chic and sophisticated is what you are going for, think about this sequined ensemble from Alex Evenings.
https://classic-blog.udn.com/ff2d3b02/183699262
You could, after all, choose a maxi dress on your big day.
https://classic-blog.udn.com/190f4c92/183699022
Browse via the new assortment of Mother of the Bride gowns 2021.
https://james850.jimdofree.com/2025/10/15/3/
Much like the mom of the groom, step-mothers of both the bride or groom ought to follow the lead of the mother of the bride.
https://mypaper.pchome.com.tw/emmasullivan02/post/1382133034
With over five years of experience in bridal, she is an expert on all issues trend.
https://gloria4266.wixsite.com/gloria4266/post/____7
Today’s mother of the bride collections consist of figure-flattering frocks that are designed to intensify your mum’s finest bits.
https://classic-blog.udn.com/ecd3ad00/184008271
In years passed by, being mother of the bride has meant frumpy frocks and ill-fitting gown fits, but no more!
https://cathyharris7805.jimdofree.com/2025/12/04/4/
This sheath costume and sequin capelet combination boasts a modest neckline and high-slit skirt making it without delay refined and sexy.
https://alternative-freddie-9zba6oy3.dcms.site
Jules & Cleo, solely at David’s Bridal Polyester, nylon Back zipper; fully lined …
https://ameblo.jp/obgtj75/entry-12950360594.html
Weddings may be very completely different right now, relying on the place you reside.
https://alternative-freddie-9zba6oy3.dcms.site
Jules & Cleo, solely at David’s Bridal Polyester, nylon Back zipper; fully lined …
https://classic-blog.udn.com/6a5508dc/183856571
Wear yours with a strappy block heel–a fashionable and practical answer for an out of doors wedding ceremony.
https://classic-blog.udn.com/1cd1057c/184458767
Another can’t-miss palettes for mother of the bride or mother of the groom dresses?