News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

12.04 NAT Port Forwarding Issue

Started by davegravy, August 12, 2014, 03:13:09 AM

Previous topic - Next topic

davegravy

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

iptables -t nat -vnL

http://paste.ubuntu.com/8022275/



Marie.O

Shouldn't you put some source port definition in there?
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

davegravy


Marie.O

If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

davegravy


Alblasco1702

Can byou please edit RuleType port_forward (NAT) to port_forward (NAT)-PREROUTING on port_forward (NAT) chain.

davegravy

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

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

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

should be

Quote1    60 DNAT       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:33892 to:192.168.80.252:3389

Alblasco1702

can you get  me the output of: iptables -vnL (with sudo).
here i can see of the forward rule  is created.

davegravy

Quote from: 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.
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.