Iptables の設定

Iptables の設定

私はpptpdVDS 上で実行されているサービス (ip:212.109.XX.XX)。

私のルーターはこれを経由してインターネットに接続しましたVPN (PPTP)WAN IPは212.109.XX.XX

また、私はデバイス取り組んでいる554ポート(RTSP ストリーム)と IP192.168.1.33

pptpd は次のように設定されています:

localip 192.168.0.234-238,192.168.0.245 

remoteip 192.168.2.234-238,192.168.2.245

ルータはIP 192.168.2.234を取得します

ルーターの NAT 設定を次のように構成しました。NAT 設定(UDPの場合も同様)

rtsp://192.168.2.234:554で(ルーターに接続した)コンピューターからストリームを視聴しようとしましたが、rtsp://192.168.1.33:554のように動作します。しかし、rtsp://212.109.XX.XX:554

iptables に何かを入れる必要があると思います。いくつかの方法を試しましたが、どれも成功しませんでした。

サーバーの iptables ルールは現在ほぼ空です:

root@server:~# iptables -L -n -t nat
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
MASQUERADE  all  --  0.0.0.0/0            0.0.0.0/0 



root@server:~# iptables -L 
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
TCPMSS     tcp  --  anywhere             anywhere             tcp flags:SYN,RST/SYN tcpmss match 800:1536 TCPMSS clamp to PMTU

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination       

インターネット経由でデバイスに接続する方法を見つけるのを手伝ってくださいrtsp://212.109.XX.XX:554

ネットワーク図は次のようになります。

これ

関連情報