We are developing app for device named iTach WF2IR, but we doesn't actually have that device, we will get one in 4 weeks or so. Meanwhile, we should make demo for that device in a week. So we decided to connect through VPN to the remote mac connected to that device, located abroad, and then connect to device through that mac.
We connected remote mac to our VPN server (got IP 172.17.x.x
), and also connected that mac to Wi-Fi network created by device. Device has static IP 169.254.1.70
, and it gave remote mac DHCP-generated IP in the same network.
Also I connected my mac to the same VPN, and performed following:
route add 169.254.1.0/24 172.17.x.x
Where 172.17.x.x
is remote mac IP, so we could access to the device through remote mac.
On the remote mac we have configured firewall to bypass connections:
#!/bin/sh
fwcmd="/sbin/ipfw"
# Force a flushing of the current rules before we reload.
$fwcmd -f flush
# pass all through loopback device
${fwcmd} add pass all from any to any via lo
${fwcmd} add pass all from any to any via en1
${fwcmd} add pass all from any to any via fxp0
${fwcmd} add allow all from any to 127.0.0.0/8
${fwcmd} add allow all from 127.0.0.0/8 to any
${fwcmd} nat 1 config if $en1 reset deny_in redirect_port tcp 169.254.1.70:80 80
# divert all packets coming to en1 to NAT
${fwcmd} add nat 1 ip from any to any via en1
${fwcmd} add allow all from any to any
Where fxp0
is interface that connects remote mac and iTach unit, and en1
interface that connects our mac and remote mac.
Can't ping iTach from my mac. What's wrong in my configurations, and what should I do additionally to get access to the device?