LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-03-2008, 08:22 AM   #1
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 144

Rep: Reputation: 15
remote controle


i have two networks private 192.168.... and
public linux server which routing the privates to the net, using iptables , i want to give someone "support" remote control on one of my private pc ip:192.168.1.111 and the port is 3389 what rules should be applied ?
 
Old 12-03-2008, 11:14 AM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
It sounds like you basically want to forward port 3389/TCP. That would go something like:
Code:
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT

iptables -A FORWARD -i $WAN_IFACE -o $LAN_IFACE --dport 3389 \
-d 192.168.1.111 -m state --state NEW -j ACCEPT

iptables -t nat -A PREROUTING -p TCP -i $WAN_IFACE --dport 3389 -j DNAT \
--to-destination 192.168.1.111

iptables -t nat -A POSTROUTING -o $WAN_IFACE -j MASQUERADE
For a touch of security, I recommend you also specify the support person's public IP address so that only that IP is given access, like:
Code:
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT

iptables -A FORWARD -i $WAN_IFACE -o $LAN_IFACE --dport 3389 \
-d 192.168.1.111 -s 243.34.87.228 -m state --state NEW -j ACCEPT

iptables -t nat -A PREROUTING -p TCP -i $WAN_IFACE --dport 3389 -j DNAT \
--to-destination 192.168.1.111

iptables -t nat -A POSTROUTING -o $WAN_IFACE -j MASQUERADE

Last edited by win32sux; 12-03-2008 at 11:17 AM.
 
1 members found this post helpful.
Old 12-21-2008, 08:40 AM   #3
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 144

Original Poster
Rep: Reputation: 15
thank you so much
 
Old 12-21-2008, 07:31 PM   #4
wilfgascon
LQ Newbie
 
Registered: Dec 2008
Posts: 10

Rep: Reputation: 1
win32sux

win32sux - you are always very helpful and your answers are always informative. I shall bookmark this one for future use.

Thanks!
 
0 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Scripting Remote Logon - Starting Remote Gnome Desktop klmukp Linux - Newbie 1 09-21-2008 12:13 AM
"Multimedia Bar with CD/DVD/MP3 player controlé" for Toshiba M30 notebook ? frenchn00b Linux - Hardware 7 04-20-2008 05:27 AM
Anyone got the Remote Wonder (ATI's USB remote control) to work under Linux? dezireduser Linux - Hardware 2 11-06-2005 08:47 AM
FC2, no sound from CD's (changing the settings in volume controle doesn't help). brynjarh Linux - Newbie 4 07-08-2004 06:39 PM
Howto controle bandwidth usage titakker Linux - Networking 1 09-21-2003 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration