Score:3

How to route an IP address?

hk flag

I am trying to route an IP address (camera sensor) to an edge server through a 5G network. The camera sensor is connected to a 5G Modem. The camera IP address is 10.45.3.1, the 5G link IP address is 192.168.2.1, and the edge sever IP address is 10.44.2.2.

I am using Linux machines on all equipments.

So far I was able to add the camera IP address to the 5G link IP address and I am able to send the camera packets to the 5G Base Station. Now how can I route the camera IP address to the Edge server from the 5G Base Station? What iptables rules and chains should I use on the 5G Base Station to direct camera packets to 10.44.2.2, and on the Edge Server to accept those packets?

so Far on the UE I have:

#Forward every packet that comes to wwp0s20u3i5 to DATA1
iptables -A FORWARD -i wwp0s20u3i5 -o DATA1 -j ACCEPT

#DNAT to forward packets to camera
iptables -t nat -A PREROUTING -d 192.168.2.2 -j DNAT --to-destination 10.45.3.1

And on the 5G Base Station I have:

# Add routes to the camera via tun0
ip route add 10.45.3.1 via 192.168.2.1

iptables -A FORWARD -i CTRL -o tun0 -j ACCEPT

#NAT for forwarding packets
#Forward packets to different ports of the UE (srv1-in1)
iptables -t nat -A OUTPUT -d 10.45.3.1 -j DNAT --to-destination 192.168.2.2

Now how can I forward the 10.45.3.1 from the 5G Base Station to the Edge Server?

Thanks in advance

Score:3
cn flag

On the 5G Base Station you can add iptables rules:

Enable IP forwarding: echo 1 > /proc/sys/net/ipv4/ip_forward

Set up the NAT rule to forward packets from the camera IP address (10.45.3.1) to the Edge Server (10.44.2.2): iptables -t nat -A PREROUTING -d 10.45.3.1 -j DNAT --to-destination 10.44.2.2

Allow forwarding of the packets: iptables -A FORWARD -p all -s 10.45.3.1 -j ACCEPT

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.