IPtables 구성

IPtables 구성

나는pptpdVDS에서 실행 중인 서비스(ip:212.109.XX.XX).

내 라우터는 이것을 통해 인터넷에 연결되었습니다.VPN (pptp)그래서 WAN IP는212.109.XX.XX

또한 나는장치어느 작업 중554IP가 있는 포트(rtsp 스트림)192.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

네트워크 다이어그램은 대략 다음과 같습니다.

이것

관련 정보