Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 my workstation (Computer 1) to the other (Computer 2). Here's a diagram:

                Wireless router (internal ip:
Computer 1:     wlan0         eth0
Computer 2:                   eth0

This setup works; Computer 2 has internet access. Additionally I can VNC or RDP from Computer 1 to Computer 2.

Here's iptables rules after the wired connection is shared by NetworkManager:

$ sudo iptables -nL
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     udp  --              udp dpt:67
ACCEPT     tcp  --              tcp dpt:67
ACCEPT     udp  --              udp dpt:53
ACCEPT     tcp  --              tcp dpt:53

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --           state RELATED,ESTABLISHED
ACCEPT     all  --           
ACCEPT     all  --             
REJECT     all  --              reject-with icmp-port-unreachable
REJECT     all  --              reject-with icmp-port-unreachable

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

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).

How can I do this??


share|improve this question

migrated from Oct 17 '13 at 18:20

This question came from our site for system and network administrators.

Use the manual pages iptables-extensions(8) as well as iptables(8) and try yourself first. I'll amend the answer for you when you come up with specific problems.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .