Author Topic: 12.04 NAT Port Forwarding Issue  (Read 3420 times)

davegravy

  • Addicted
  • *
  • Posts: 551
    • View Profile
12.04 NAT Port Forwarding Issue
« 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/



Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: 12.04 NAT Port Forwarding Issue
« Reply #1 on: August 12, 2014, 08:19:45 am »
Shouldn't you put some source port definition in there?

davegravy

  • Addicted
  • *
  • Posts: 551
    • View Profile
Re: 12.04 NAT Port Forwarding Issue
« Reply #2 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

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: 12.04 NAT Port Forwarding Issue
« Reply #3 on: August 12, 2014, 04:00:11 pm »
Did you try it anyway?

davegravy

  • Addicted
  • *
  • Posts: 551
    • View Profile
Re: 12.04 NAT Port Forwarding Issue
« Reply #4 on: August 12, 2014, 04:12:45 pm »
Did you try it anyway?

Yes, sorry, I should have said.

Alblasco1702

  • Regular Poster
  • **
  • Posts: 45
    • View Profile
Re: 12.04 NAT Port Forwarding Issue
« Reply #5 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.

davegravy

  • Addicted
  • *
  • Posts: 551
    • View Profile
Re: 12.04 NAT Port Forwarding Issue
« Reply #6 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

Alblasco1702

  • Regular Poster
  • **
  • Posts: 45
    • View Profile
Re: 12.04 NAT Port Forwarding Issue
« Reply #7 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.

davegravy

  • Addicted
  • *
  • Posts: 551
    • View Profile
Re: 12.04 NAT Port Forwarding Issue
« Reply #8 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.