Page 1 of 1

EC2にてローカルブリッジ接続が効かない

Posted: Tue Nov 19, 2019 9:22 am
by kalfes
VPN Bridgeを載せたRaspberry Pi 3 B+と、VPN Serverを載せたAWS EC2インスタンス(CentOS 7.7.1908)とで拠点間接続しようとしています。
ラズパイからEC2上の仮想HUBのNATまでpingコマンドが通ったのですが、EC2まで通りません。
この間の接続手段として考えられるSecureNATとローカルブリッジを様々な設定で試しました。
一番の理想的な接続はeth0にローカルブリッジするものですが、MacでのManagerによる通常の設定以外の処置は必要でしょうか?
すでにAWSには問い合わせたのですが、有効な解決策はありませんでした。

以上の件、どうぞよろしくお願いします。

Re: EC2にてローカルブリッジ接続が効かない

Posted: Tue Nov 19, 2019 10:21 am
by cedar
VMでは、セキュリティなどのため、MACアドレスの偽装が禁止されている場合があります。

ローカルブリッジや SecureNAT が機能しない環境では、接続したい対象のホストに VPN Client を導入することが有効です。

Re: EC2にてローカルブリッジ接続が効かない

Posted: Tue Nov 26, 2019 2:38 am
by kalfes
仕様書的にVPN Clientは使えません。

[ここ][https://www.vpnusers.com/viewtopic.php?f=15&t=2361]で同じようなことが書いてありました。
強制的にプロミスキャスモードを使用したら古いEC2インスタンスのデータにアクセスしました。
バグで想定外の挙動ですね。
もう少し頑張ります。

Re: EC2にてローカルブリッジ接続が効かない

Posted: Wed Dec 11, 2019 3:44 am
by kalfes
[1][2]を見て試行錯誤をした結果、プロミスキャスモードはオンにできるが効かず、ローカルブリッジは利用できない、VPN Clientを用いるしかないことを報告します。

[1]https://aws.amazon.com/jp/answers/netwo ... abilities/
===== (該当部分を一部抜粋) =====
Packet Sniffing
It is not possible for a virtual instance running in promiscuous mode to receive or sniff traffic that is intended for a different virtual instance. While customers can elect to place their interfaces into promiscuous mode, the hypervisor will not deliver any traffic to an instance that is not addressed to it. Even two virtual instances that are owned by the same customer located on the same physical host cannot listen to each other’s traffic.
=============================

[2]https://forums.aws.amazon.com/thread.js ... adID=51771
===== (該当部分を一部抜粋) =====
While it's possible to set promiscuous mode on an interface as root or administrator, EC2 and VPC will only forward traffic that matches the IP address of that instance, with a few minor exceptions such as ARP traffic.
=============================