This is a follow-up server error question to this server error response
I'm trying to access some network devices outside of my home network, and my AT & T U-Verse router modem does not allow me to do that because it does not allow true "port redirection". So I notice that a Raspian Linux computer is placed behind the network and all external requests are forwarded to the AT & T modem.
Normally, with a better modem / router like my old D-Link, I would just use "port redirect" and redirect port # 10020 to 192.168.1.20. Port # 10021 to 192.168.1.21 etc
The home network configuration currently looks like this:
ATT reverse modem / router 126.96.36.199 | | ------> http://192.168.1.21:80 (network device one) | | ------> http://192.168.1.22:80 (network device two) etc
Since Att-Uverse does not allow "port redirection," as my good old dLink router used to do, I'm thinking of adding a new computer to the network and passing ALL from the att-umverse:
ATT-Uverse modem / router http://188.8.131.52:80 | | ------> http://192.168.1.21:80 (network device one) | | ------> http://192.168.1.22:80 (network device two) etc | | ------> http://192.168.1.99:80 (new computer now receives ALL incoming traffic)
then, somehow, configure the new machine to "tunnel" the following:
http://184.108.40.206:10021 == >> 192.168.1.21:80
http://220.127.116.11:10022 == >> 192.168.1.22:80
So I can access outside of my home network only on different port numbers to 1.21, 1.22 and so on.
supposedly this should do it:
echo "1"> / proc / sys / net / ipv4 / ip_forward; iptables -A PREROUTING -t nat -i eth0 -p tcp -dport 10020 -j DNAT -to-destination-192.168.1.20: 80 iptables -A FORWARD -p tcp -d 192.168.1.20 --dport 80 -j ACCEPT iptables -A POSTROUTING -t nat -s 192.168.1.20 -o eth0 -j MASQUERADE
Unfortunately that did not work for me.
I can actually ping 192.168.1.20 from the new computer.
Note: I also have Apache installed, but I can only see that Apache works fine when I "sudo iptables –flush;"
Thank you all.
Linux raspberrypi 4.14.71-v7 + # 1145 SMP Fri Sep 21 15:38:35 BST 2018 armv7l GNU / Linux