Score:0

NAT from internet/firewall thru a Ubuntu computer, to another network and device. (routing)

us flag

(Ubuntu) computer has two network interfaces: (and is not sunning iptables)

wlx1cbfce8bd2bd: inet 10.1.1.129 netmask 255.255.255.0

on this network, there is a device:  10.1.1.10 - with a UDP port 10000 that I wish to publish to the internet.

the second interface is....

enp4s0: inet 192.168.1.80 netmask 255.255.255.0 (this is connected to Fortigate Firewall)

Fortigate LAN IP is:  192.168.1.1 

I wish to enable somebody to connect to the UDP port 10000 of the 10.1.1.10 device from the internet.

I do know how to set up NAT(Virtual IP) and IP4Policy to forward traffic to 192.168.1.80  - but I do not know how to do it to 10.1.1.10   

I assume I need route(s) on Fortigate, as well as on my PC (192.168.1.80)  to achieve that.

I have no problem NATting from the firewall to the PC's 192.168.1.80 address and some port, but how should this traffic be forwarded to the 10.1.1.x network?

ru flag
`iptables` or `nftables` are going to be needed for your NAT between the devices to work. If your device is set up as follows:`[Device] <--> Ubuntu <--> Fortigate` then you need to do some NAT rules on iptables or nftables to start forwarding the traffic once it gets to Ubuntu to the device. With three hops to the device from the Internet, we call this "double NATting"
us flag
I totally agree. I have iptables running. The question that ramains then is which rules are necessary to make it possible to connect to enp4s0 interface 192.168.1.80:10000 and in reality talk to 10.1.1.10:10000 on the wlx1cbfce8bd2bd interface.
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.