View previous topic :: View next topic |
Author |
Message |
rain_physics n00b
Joined: 24 Mar 2013 Posts: 22
|
Posted: Sun Mar 24, 2013 3:56 pm Post subject: remote desktop Problem |
|
|
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 |
|
|
your_WooDness Tux's lil' helper
Joined: 25 Oct 2007 Posts: 77
|
Posted: Sun Mar 24, 2013 6:19 pm Post subject: |
|
|
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 |
|
|
doom555 n00b
Joined: 29 Oct 2012 Posts: 57
|
Posted: Mon Mar 25, 2013 8:05 pm Post subject: |
|
|
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! |
|
Back to top |
|
|
rain_physics n00b
Joined: 24 Mar 2013 Posts: 22
|
Posted: Mon Mar 25, 2013 9:09 pm Post subject: |
|
|
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 |
|
|
doom555 n00b
Joined: 29 Oct 2012 Posts: 57
|
Posted: Mon Mar 25, 2013 10:15 pm Post subject: |
|
|
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 |
|
|
rain_physics n00b
Joined: 24 Mar 2013 Posts: 22
|
Posted: Tue Mar 26, 2013 10:28 am Post subject: |
|
|
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 |
|
|
doom555 n00b
Joined: 29 Oct 2012 Posts: 57
|
Posted: Tue Mar 26, 2013 11:47 am Post subject: |
|
|
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 |
|
|
|