×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

IP Forwarding

  • Posts: 56
  • Thank you received: 6

IP Forwarding was created by Gord Tulloch

Hi there:

In my micro-observatory I have an RPi4 running Stellarmate for the telescope and an RPi4 running Astroberry Server for the roof, allskycam, etc. Both are wired to my home network via ethernet cable. I am on a mission to dispense with as many cables as possible as I like to use my observatory in the extreme cold and cables have a tendency to stiffen up and break in -35C for some reason! So I have a bluetooth adapter for the mount, and everything else mounted on the scope itself so I only have a 12v power cable going to the scope. The scope is now connecting wirelessly to the observatory RPI hotspot on wlan0, the observatory RPi is hard wired via eth0 (10.0.0.62 on the local LAN).

However, the hotspot is NATted so I can only see the telescope RPi from the observatory computer. Is there any way to set up Astroberry server up as a bridge so the telescope gets an IP on my home network and is accessible from my desk? Right now I have to RDP to the obs RPi then NoVNC to the observatory computer, or run KStars/EKOS on the observatory computer.

I attempted to set up iptables and routing like thus:

sudo iptables -F
sudo iptables -t nat -F
sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
sudo iptables -A FORWARD -i wlan0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT

sudo nano /proc/sys/net/ipv4/ip_forward
Set net.ipv4.ip_forward=1

sudo ip route del 0/0 dev eth0 &> /dev/null
a=`route | awk "/${wlan}/"'{print $5+1;exit}'`
sudo route add -net default gw 10.0.0.62 netmask 0.0.0.0 dev eth0 metric $a

However I'm not clear on hot the hotspot is set up on the Astroberry Server to turn off NAT. Can anyone help?
Last edit: 1 year 1 month ago by Gord Tulloch.
1 year 1 month ago #89999

Please Log in or Create an account to join the conversation.

Moderators: Radek Kaczorek
Time to create page: 0.382 seconds