Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
remote desktop Problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
rain_physics
n00b
n00b


Joined: 24 Mar 2013
Posts: 22

PostPosted: Sun Mar 24, 2013 3:56 pm    Post subject: remote desktop Problem Reply with quote

Hi everybody

I am using Gentoo 3.3.8 x86_64. I am trying to connect my laptop to my office PC( Windows 7 is running there ) using rdesktop. I can connect it from any network but I am unable to connect when I use my hostel internet. Since I am able to connect through other network it means every thing configure pretty fine but I don't know why I am unable to use rdesktop in my hostel network
Here is the error
ERROR: {my IP}: unable to connect

any Idea
Back to top
View user's profile Send private message
your_WooDness
Tux's lil' helper
Tux's lil' helper


Joined: 25 Oct 2007
Posts: 77

PostPosted: Sun Mar 24, 2013 6:19 pm    Post subject: Reply with quote

Hi,

maybe the port is blocked that is used for rdesktop. I think it's 3389. Might also be that the firewall is blocking RDP...

w00d
Back to top
View user's profile Send private message
doom555
n00b
n00b


Joined: 29 Oct 2012
Posts: 57

PostPosted: Mon Mar 25, 2013 8:05 pm    Post subject: Reply with quote

Try putting the RTP server listening on port 80 or port 443 and connect with the client on the new configured port, most likely it will work! :wink:
Back to top
View user's profile Send private message
rain_physics
n00b
n00b


Joined: 24 Mar 2013
Posts: 22

PostPosted: Mon Mar 25, 2013 9:09 pm    Post subject: Reply with quote

Thanks for the reply
I think I didn't pose my problem very well.

I can use rdesktop when I use some other network like my university internet connection, my friend's home internet conneciton but I am unable to connection to my office PC using rdesktop through my hostel internet connection

since I am able to connect my office PC through other internet connection its shows that every thing is configure very well on my Gentoo.

can you guys suggest me any solution?
Back to top
View user's profile Send private message
doom555
n00b
n00b


Joined: 29 Oct 2012
Posts: 57

PostPosted: Mon Mar 25, 2013 10:15 pm    Post subject: Reply with quote

If it does not work on the network of your hostel is because the new connections to TCP port 3389 to your server (and in general to the internet) are blocked by a firewall (or even worse, all traffic goes through a trasparent proxy).
In order to allow web traffic (HTTP and HTTPS) connections to port 80 and 443 are allowed... This is why I suggested you to change the port (or simply configure port forwarding on your router, so that the service is accessible from the Internet on a port more "easily" accessible).
Back to top
View user's profile Send private message
rain_physics
n00b
n00b


Joined: 24 Mar 2013
Posts: 22

PostPosted: Tue Mar 26, 2013 10:28 am    Post subject: Reply with quote

Thanks doom555

I got your point.

Since I am a newbies , could you suggest me how can I make port forwarding for rdesktop using iptables

Thanks in advance for your kind suggestion
Back to top
View user's profile Send private message
doom555
n00b
n00b


Joined: 29 Oct 2012
Posts: 57

PostPosted: Tue Mar 26, 2013 11:47 am    Post subject: Reply with quote

I do not know the structure of your network, but if your server is connected behind nat, you should configure the portforwarding directly on the router. However, if your server is directly accessible from the Internet this is the iptables rule that you should use:
Code:
# iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-ports 3389

(where eth0 is the network interface exposed to the internet and port 80 is the new port on which the server will listen as well as the old)

Remenber to check if packet forwarding is enabled:
Code:
# cat /proc/sys/net/ipv4/conf/eth0/forwarding

1: enabled , 0: disabled
If enabled it is ok, else if it is disabled:
Code:
# echo '1' > /proc/sys/net/ipv4/conf/eth0/forwarding

now is enabled, but not after reboot... If you want it after reboot enabled, you can edit /etc/sysctl.conf , for example a line with
Code:
net.ipv4.ip_forward = 1

enable a packet forwarding on all interfaces.

Do not forget that the iptables rules are deleted at restart of system. To do so they are restored automatically
save the current configuration:
Code:
# /etc/init.d/iptables save

and add the iptables init script at boot:
Code:
# rc-update add iptables


EDIT: I had forgotten that your server was running with windows... you can not use iptables on windows, then probably the solution above is useless! What you need to do is set up port forwarding on your router, that despite probably running Linux, it also provides a simpler interface for configuration!
If, however, as I already suggested, the windows computer is directly exposed on the internet, you could use another firewall such as http://wipfw.sourceforge.net/ (on which I know nothing except its existence).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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