You are not logged in.

#1 2011-08-26 00:31:04

Brandon_R
Member
Registered: 2011-08-22
Posts: 36

Solved - Port forwarding on linux

Hey guys,

i'm having a bit of trouble with port forwarding on linux. I was reading into iptables etc but it seems more like a firewall than a port forwarder. Usually on windows i would just go to my router and set the port forwarder to my local ip that i would get from running ipconfig in cmd ex 192.168.0.13 etc. What would be a good starting point for something like this in linux? Any recommended readings?

Last edited by Brandon_R (2011-08-27 16:07:19)

Offline

#2 2011-08-26 00:42:32

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Solved - Port forwarding on linux

Brandon_R,

you can use the same method in Linux.

To get your local ip, instead of ipconfig, use 'ip addr'.

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#3 2011-08-26 01:03:34

Brandon_R
Member
Registered: 2011-08-22
Posts: 36

Re: Solved - Port forwarding on linux

Ok i set up the port forward to my nodejs webserver on port 8000 but it still doesn't work. it keeps timing out. Do i need do so any "internal" port forwarding in linux like in the iptables? that  would be automitically be done in windows. I understand i need to do everything in linux especially in arch and this way i can actually learn smile

Last edited by Brandon_R (2011-08-26 01:04:12)

Offline

#4 2011-08-26 01:27:44

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Solved - Port forwarding on linux

I use several port forwardings and I do not use iptables. I even uninstalled it,
since my router has a good firewall and i don't see the need to complicate things.

On  my local net there are Linux and one win7 machine and there is no difference,
just configure the router (with the correct local IP).

In fact, applications that use UPNP don't even need that I configure the router, they do
it themselves, as long as your router accepts UPNP (most do) and this option is enabled
on the router.

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#5 2011-08-26 03:37:49

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: Solved - Port forwarding on linux

You have a Linux machine as your router/gateway device? iptables is the correct tool for port forwarding; it does both firewalling and NAT'ing. (To be technically correct, a "Port Forward" is a DNAT)

There should be enough info here to get you going:
http://www.google.com/search?sourceid=c … rt+forward

Offline

#6 2011-08-27 12:02:25

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Solved - Port forwarding on linux

https://wiki.archlinux.org/index.php/Internet_Share  and 5-6 other relevant pages on the wiki could be a start too.
(not to mention the iptables/ipset manuals)

Last edited by Mr.Elendig (2011-08-27 12:02:42)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#7 2011-08-27 12:28:50

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: Solved - Port forwarding on linux

One of the best sources I've found for learning and working with iproute2 is here: http://lartc.org/howto/

Offline

#8 2011-08-27 16:07:06

Brandon_R
Member
Registered: 2011-08-22
Posts: 36

Re: Solved - Port forwarding on linux

Ok guys sorry for the trouble but the problem wasn't linux at all. I was listening on the wrong port sad

Offline

#9 2011-08-27 16:37:52

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Solved - Port forwarding on linux

Brandon_R,
please mark this thread as [SOLVED] by editing the title of your first post.


To know or not to know ...
... the questions remain forever.

Offline

Board footer

Powered by FluxBB