- Details
-
Category: News
-
Published: 02 July 2014
-
Hits: 1910
Networking:
- JHU: Connect LCSR-QLA PC to router, address of LCSR-QLA should be 192.168.1.5
- JHU: IP of router is 192.168.1.1, login is admin, password is Fe....
- Router is configure to forward TCP and UDP to 192.168.1.5 for port range 10000-10500
- JHU: IP public router address is 128.220.72.28 - not registered in DNS
- VU: IP address for Linux gateway box is on eth2 129.59.78.75 (DNS davinci-ubuntu1204.vuse.vanderbilt.edu)
- VU: Linux box address is 192.168.1.104 on LAN
- VU: xPC address 192.168.1.201 on LAN
- VU: linux for testing Stereo: 192.168.1.105 on LAN
iptables:
# allow port forwarding
sudo iptables -A FORWARD -i eth2 -j ACCEPT
sudo iptables -A FORWARD -i eth3 -j ACCEPT
sudo echo '1' > /proc/sys/net/ipv4/conf/eth2/forwarding
sudo echo '1' > /proc/sys/net/ipv4/conf/eth3/forwarding
# cleanup all existing rules
sudo iptables -F
sudo iptables -X
sudo iptables -t nat -F
sudo iptables -t nat -X
sudo iptables -t mangle -F
sudo iptables -t mangle -X
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
# from JHU
sudo iptables -t nat -A PREROUTING -p udp -s 128.220.72.28 --dport 10005 --j DNAT --to 192.168.1.201:10005
# to JHU
sudo iptables -t nat -A PREROUTING -p udp -s 192.168.1.201 --dport 10005 --j DNAT --to 128.220.72.28:10005
# from JHU
sudo iptables -t nat -A PREROUTING -p udp -s 128.220.72.28 --dport 10004 --j DNAT --to 192.168.1.201:10004
# to JHU
sudo iptables -t nat -A PREROUTING -p udp -s 192.168.1.201 --dport 10004 --j DNAT --to 128.220.72.28:10004
sudo iptables -t nat -A POSTROUTING -j MASQUERADE
With these rules we can test using:
VU: nc -u -l 10005 JHU: nc -u 129.59.78.75 10005
VU: nc -u 192.168.1.104 10005 JHU: nc -u -l 10005
To see rules, sudo iptables -L -t nat
Video:
- VU starts the cisstCameraViewer with port 10001
- JHU starts cisstVideoPlayer -c 2 -i 129.59.78.75 -p 10001