Due to our very remote location and budget restraints my internet connection is limited to cellular 3G / EDGE. The service provider does not have an option for supplying me with a public IP, so we have managed to work around this by running my linux server through a VPN, with a tunnel to a dedicated IP. An added (temporary) complication is that it is a virtual machine, VMWare, soon to be replaced by a physical machine. Currently I successfully run a couple GPS trackers on this server, they are able to access the server through the public IP through tun0, the tunnel set up by the VPN. I can also access a couple other IP devices located in my local network from the internet, so the setup does work.I need to set up a TCP socket in order to grab data coming from another device. I run $ ncat -l -k -p 8993 and $ netstat -l shows that it is indeed listening on that port.tcp        0      0 *:8993                  *:*                     LISTENtcp6       0      0 [::]:8993               [::]:*                  LISTENThe results are that I can connect to this socket with telnet when I access the server through its local adapter eth0 from within my local network (192.168.0.113) but I cannot connect to it using the public IP (tun0). canyouseeme.org also shows that port to be closed. I have the following line in iptables:iptables -A FORWARD -i tun0 -o eth0 -p tcp --syn --dport 8993 -m conntrack --ctstate NEW -j ACCEPTI also put in the following lines to see if it helps to solve anything, but so far no joy.iptables -A FORWARD -i tun0 -o eth0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPTiptables -A FORWARD -i eth0 -o tun0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPTI know I'm missing something small here, since my other devices access the server from the public side with no problem. Any help would be greatly appreciated.This is what $ ifconfig shows:eth0      Link encap:Ethernet  HWaddr 00:0c:29:45:c6:83      inet addr:192.168.0.113  Bcast:192.168.0.255  Mask:255.255.255.0      inet6 addr: fe80::20c:29ff:fe45:c683/64 Scope:Link      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1      RX packets:11019 errors:0 dropped:0 overruns:0 frame:0      TX packets:6309 errors:0 dropped:0 overruns:0 carrier:0      collisions:0 txqueuelen:1000      RX bytes:5882474 (5.6 MiB)  TX bytes:1197497 (1.1 MiB)lo        Link encap:Local Loopback      inet addr:127.0.0.1  Mask:255.0.0.0      inet6 addr: ::1/128 Scope:Host      UP LOOPBACK RUNNING  MTU:65536  Metric:1      RX packets:120 errors:0 dropped:0 overruns:0 frame:0      TX packets:120 errors:0 dropped:0 overruns:0 carrier:0      collisions:0 txqueuelen:0      RX bytes:8069 (7.8 KiB)  TX bytes:8069 (7.8 KiB)tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00      inet addr:10.212.0.6  P-t-P:10.212.0.5  Mask:255.255.255.255      UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1      RX packets:4206 errors:0 dropped:0 overruns:0 frame:0      TX packets:3948 errors:0 dropped:0 overruns:0 carrier:0      collisions:0 txqueuelen:100      RX bytes:3528488 (3.3 MiB)  TX bytes:392464 (383.2 KiB)
Netcat not working on linux server running VPN
linux;iptables;netcat