Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Forwarding ports to the outside world
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
markyd
n00b
n00b


Joined: 16 Apr 2002
Posts: 44

PostPosted: Wed Jun 18, 2003 11:15 am    Post subject: Forwarding ports to the outside world Reply with quote

ok I run 6 computer at home, one of which acts as an internet gateway for the rest of the machines. Setting this up is easy enough using iptables. I have also managed to get transparent proxying working.

However, what I want to do now is something a bit wierd. The gateway is running gentoo (of course) and is the only computer directly connected to the outside world. One of the computers on the internal lan is running windows xp and what I want to do is have alls request from the outside world on port 3389 (remote desktop) addressed to the gateway forwarded to the win xp box on the internal lan.

Any ideas?
Back to top
View user's profile Send private message
darktux
Veteran
Veteran


Joined: 16 Nov 2002
Posts: 1086
Location: Coimbra, Portugal

PostPosted: Wed Jun 18, 2003 12:03 pm    Post subject: Reply with quote

iptables -t nat -A PREROUTING -p tcp -d your.externel.ip --dport 3389 -j DNAT --to ip.of.your.windows.box

From the top of my head, this is the rule to use.
_________________
Lego my ego, and I'll lego your knowledge

www.tuxslare.org - My reborn website :P
Back to top
View user's profile Send private message
markyd
n00b
n00b


Joined: 16 Apr 2002
Posts: 44

PostPosted: Thu Jun 19, 2003 12:07 am    Post subject: Reply with quote

Thanks that worked perfectly...
Back to top
View user's profile Send private message
darktux
Veteran
Veteran


Joined: 16 Nov 2002
Posts: 1086
Location: Coimbra, Portugal

PostPosted: Thu Jun 19, 2003 12:49 am    Post subject: Reply with quote

markyd wrote:
Thanks that worked perfectly...


You'll now have to hop on one leg, put your hands on your waist, and scream: "DARKTUX r0x, AND HE 0WNS ME". :wink:
_________________
Lego my ego, and I'll lego your knowledge

www.tuxslare.org - My reborn website :P
Back to top
View user's profile Send private message
fatcat.00
Tux's lil' helper
Tux's lil' helper


Joined: 12 Aug 2002
Posts: 145

PostPosted: Thu Jun 19, 2003 1:13 am    Post subject: Reply with quote

Yes that may work, but realize that you have essentially placed your XP box on the outside of your firewall, at least for 3389. Since this is a remote admin tool, I STRONGLY suggest you not do this.

If you can lock down the source address that will help matters, but make darn sure you have a really hard password, AND you keep wired into Microsoft for bug fixes on that service.

IMHO you are asking for trouble, but I am sure you have already weighed the benefits vs. drawbacks.
_________________
-- Fatcat
Back to top
View user's profile Send private message
markyd
n00b
n00b


Joined: 16 Apr 2002
Posts: 44

PostPosted: Thu Jun 19, 2003 3:26 am    Post subject: Security Reply with quote

Well basically i just wrote a shell script that enables it for 30 mins then disables it. So I don't think its that insecure. Its just as secure as having ssh open on your machine.
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Thu Jun 19, 2003 5:29 am    Post subject: Re: Security Reply with quote

markyd wrote:
Well basically i just wrote a shell script that enables it for 30 mins then disables it. So I don't think its that insecure. Its just as secure as having ssh open on your machine.
well not really.. because ssh is running on linux, and this is opening your windows pc up to the outside world, which is a whole other ball game :)
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum