LinuxMCE Forums

General => Installation issues => Topic started by: davegravy on August 12, 2014, 03:13:09 am

Title: 12.04 NAT Port Forwarding Issue
Post by: davegravy on August 12, 2014, 03:13:09 am
Port forwarding doesn't seem to be working, or I'm not understanding how to configure it in webadmin.

Alblasco, you requested this on IRC but I wasn't around.

https://www.dropbox.com/s/yiae17ycqe246qx/Screenshot%202014-08-11%2021.07.07.png

Also

Code: [Select]
iptables -t nat -vnL
http://paste.ubuntu.com/8022275/


Title: Re: 12.04 NAT Port Forwarding Issue
Post by: Marie.O on August 12, 2014, 08:19:45 am
Shouldn't you put some source port definition in there?
Title: Re: 12.04 NAT Port Forwarding Issue
Post by: davegravy on August 12, 2014, 03:05:05 pm
Shouldn't you put some source port definition in there?

Not according to Alblasco's instructions:

http://forum.linuxmce.org/index.php?topic=13720.msg99824#msg99824
Title: Re: 12.04 NAT Port Forwarding Issue
Post by: Marie.O on August 12, 2014, 04:00:11 pm
Did you try it anyway?
Title: Re: 12.04 NAT Port Forwarding Issue
Post by: davegravy on August 12, 2014, 04:12:45 pm
Did you try it anyway?

Yes, sorry, I should have said.
Title: Re: 12.04 NAT Port Forwarding Issue
Post by: Alblasco1702 on August 12, 2014, 06:15:09 pm
Can byou please edit RuleType port_forward (NAT) to port_forward (NAT)-PREROUTING on port_forward (NAT) chain.
Title: Re: 12.04 NAT Port Forwarding Issue
Post by: davegravy on August 14, 2014, 06:33:23 am
Shows up in iptables now:

http://paste.ubuntu.com/8041883/

But still doesn't seem to forward traffic.

I got it working manually in iptables using

Code: [Select]
iptables -t nat -A PREROUTING -p tcp --dport 33892 -j DNAT --to 192.168.80.252:3389
iptables -A FORWARD -p tcp -d 192.168.80.252 --dport 3389 -j ACCEPT

Seems that the required FORWARD chain rule does not get created (even though it is created in webadmin). Also seems that

Quote
    1    60 DNAT       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:3389 to:192.168.80.252:3389

should be

Quote
    1    60 DNAT       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:33892 to:192.168.80.252:3389
Title: Re: 12.04 NAT Port Forwarding Issue
Post by: Alblasco1702 on August 14, 2014, 11:19:13 am
can you get  me the output of: iptables -vnL (with sudo).
here i can see of the forward rule  is created.
Title: Re: 12.04 NAT Port Forwarding Issue
Post by: davegravy on August 14, 2014, 08:05:03 pm
can you get  me the output of: iptables -vnL (with sudo).
here i can see of the forward rule  is created.
It's not. I'll have to wait till I get home to get you the output of that command, but I did run it last night and noticed that the forward rule was missing. When created the forward rule manually via the iptables command from my last post, it started working.