You are not logged in.
Hi,
I connect to my wireless network through NetworkManager. In addition I have another computer connected to the first one through ethernet. I'm using NetworkManager to share the wireless connection of the first computer to the second one. Here's a diagram:
Internet
|
Wireless router (internal ip: 10.0.1.1)
|
(Wifi)
|
Computer 1: wlan0 eth0
10.0.1.3 10.42.0.1
|
Computer 2: eth0
10.42.0.48
This setup works; Computer 2 has internet access. Additionally I can VNC or RDP from Computer 1 to 2.
Now I want to do some port forwarding so I can access the second computer from the wifi network (10.0.1.*), for example VNC (port 5900).
I couldn't find anything in NetworkManager to do that, so I tried iptables directly but without success. Here's an example of command I've tried (ran on Computer 1):
sudo iptables -A PREROUTING -t nat -i wlan0 -p tcp --dport 5900 -j DNAT --to 10.42.0.48:5900
sudo iptables -A FORWARD -p tcp -d 10.42.0.48 --dport 5900 -j ACCEPT
But this did not work, or anything else for that mater. To test, I run (on Computer 1):
vncviewer 10.0.1.3 ::5900
but I always get connection refused.
Any idea or suggestion as to how to setup iptables correctly?
Thanks!
Offline
I use Debian but I made an account on here to help you.
Try changing your "--to 10.42.0.48:5900" to '--to 10.42.0.48'
I'm also trying to setup IPTables, for my new servers in my case.
Join the PocoCraft public TeamSpeak server at the following: pococraft.org
Trace and IP address, domain or hostname at http://trace.pococraft.org/
Any of my dedicated users in TeamSpeak will gain access to their own public or private MineCraft server for FREE!
I enjoy taking suggestions towards future server ideas!
Offline