How to add xRDP and XFCE4 o UFW rules?

Clash Royale CLAN TAG#URR8PPP up vote
0
down vote
favorite
I'm new here and I've just installed and configured xRDP and XFCE4 on my Ubuntu 16 server so I can Remote Desktop from my Windows PC. Faizan Akram Dar's answer worked perfectly!
Then I installed an open VPN server and followed the recommendations to activate the UFW firewall. And so the Remote Desktop no longer worked. I solved it by adding to the the UFW rules the whole IP range of my router's DHCP service and the 3389 port.
sudo ufw allow from 192.168.1.1 to 192.168.1.100
sudo ufw allow 3389
However, I was wondering if there is a way to set up a more restrictive rule for this purpose.
Thank you!
xfce remote-desktop ufw xrdp
add a comment |Â
up vote
0
down vote
favorite
I'm new here and I've just installed and configured xRDP and XFCE4 on my Ubuntu 16 server so I can Remote Desktop from my Windows PC. Faizan Akram Dar's answer worked perfectly!
Then I installed an open VPN server and followed the recommendations to activate the UFW firewall. And so the Remote Desktop no longer worked. I solved it by adding to the the UFW rules the whole IP range of my router's DHCP service and the 3389 port.
sudo ufw allow from 192.168.1.1 to 192.168.1.100
sudo ufw allow 3389
However, I was wondering if there is a way to set up a more restrictive rule for this purpose.
Thank you!
xfce remote-desktop ufw xrdp
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm new here and I've just installed and configured xRDP and XFCE4 on my Ubuntu 16 server so I can Remote Desktop from my Windows PC. Faizan Akram Dar's answer worked perfectly!
Then I installed an open VPN server and followed the recommendations to activate the UFW firewall. And so the Remote Desktop no longer worked. I solved it by adding to the the UFW rules the whole IP range of my router's DHCP service and the 3389 port.
sudo ufw allow from 192.168.1.1 to 192.168.1.100
sudo ufw allow 3389
However, I was wondering if there is a way to set up a more restrictive rule for this purpose.
Thank you!
xfce remote-desktop ufw xrdp
I'm new here and I've just installed and configured xRDP and XFCE4 on my Ubuntu 16 server so I can Remote Desktop from my Windows PC. Faizan Akram Dar's answer worked perfectly!
Then I installed an open VPN server and followed the recommendations to activate the UFW firewall. And so the Remote Desktop no longer worked. I solved it by adding to the the UFW rules the whole IP range of my router's DHCP service and the 3389 port.
sudo ufw allow from 192.168.1.1 to 192.168.1.100
sudo ufw allow 3389
However, I was wondering if there is a way to set up a more restrictive rule for this purpose.
Thank you!
xfce remote-desktop ufw xrdp
xfce remote-desktop ufw xrdp
asked Jan 29 at 23:06
Tudor
1
1
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
I don't think those rules do what you think they do.
sudo ufw allow from 192.168.1.1 to 192.168.1.100
allows connections to ANY port with ANY protocol FROM the single address 192.168.1.1 TO the single address 192.168.1.100 - unless your interface is actually configured on 192.168.1.100 and you have a client at 192.168.1.1 this will have no effect.
On the other hand,
sudo ufw allow 3389
will allow connections to port 3389 with ANY protocol from ANY remote address to ANY local interface.
Probably what you want is either
sudo ufw allow from 192.168.1.0/24 to any port 3389
or (slightly more restrictive)
sudo ufw allow from 192.168.1.0/24 to any port 3389 proto tcp
which will allow any clients on the local CIDR subnet 192.168.1.1 to 192.168.1.254 to connect to the RDP port using TCP:
$ sudo ufw status numbered
Status: active
To Action From
-- ------ ----
[ 1] 22/tcp ALLOW IN 192.168.1.0/24
[ 2] 3389/tcp ALLOW IN 192.168.1.0/24
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I don't think those rules do what you think they do.
sudo ufw allow from 192.168.1.1 to 192.168.1.100
allows connections to ANY port with ANY protocol FROM the single address 192.168.1.1 TO the single address 192.168.1.100 - unless your interface is actually configured on 192.168.1.100 and you have a client at 192.168.1.1 this will have no effect.
On the other hand,
sudo ufw allow 3389
will allow connections to port 3389 with ANY protocol from ANY remote address to ANY local interface.
Probably what you want is either
sudo ufw allow from 192.168.1.0/24 to any port 3389
or (slightly more restrictive)
sudo ufw allow from 192.168.1.0/24 to any port 3389 proto tcp
which will allow any clients on the local CIDR subnet 192.168.1.1 to 192.168.1.254 to connect to the RDP port using TCP:
$ sudo ufw status numbered
Status: active
To Action From
-- ------ ----
[ 1] 22/tcp ALLOW IN 192.168.1.0/24
[ 2] 3389/tcp ALLOW IN 192.168.1.0/24
add a comment |Â
up vote
0
down vote
I don't think those rules do what you think they do.
sudo ufw allow from 192.168.1.1 to 192.168.1.100
allows connections to ANY port with ANY protocol FROM the single address 192.168.1.1 TO the single address 192.168.1.100 - unless your interface is actually configured on 192.168.1.100 and you have a client at 192.168.1.1 this will have no effect.
On the other hand,
sudo ufw allow 3389
will allow connections to port 3389 with ANY protocol from ANY remote address to ANY local interface.
Probably what you want is either
sudo ufw allow from 192.168.1.0/24 to any port 3389
or (slightly more restrictive)
sudo ufw allow from 192.168.1.0/24 to any port 3389 proto tcp
which will allow any clients on the local CIDR subnet 192.168.1.1 to 192.168.1.254 to connect to the RDP port using TCP:
$ sudo ufw status numbered
Status: active
To Action From
-- ------ ----
[ 1] 22/tcp ALLOW IN 192.168.1.0/24
[ 2] 3389/tcp ALLOW IN 192.168.1.0/24
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I don't think those rules do what you think they do.
sudo ufw allow from 192.168.1.1 to 192.168.1.100
allows connections to ANY port with ANY protocol FROM the single address 192.168.1.1 TO the single address 192.168.1.100 - unless your interface is actually configured on 192.168.1.100 and you have a client at 192.168.1.1 this will have no effect.
On the other hand,
sudo ufw allow 3389
will allow connections to port 3389 with ANY protocol from ANY remote address to ANY local interface.
Probably what you want is either
sudo ufw allow from 192.168.1.0/24 to any port 3389
or (slightly more restrictive)
sudo ufw allow from 192.168.1.0/24 to any port 3389 proto tcp
which will allow any clients on the local CIDR subnet 192.168.1.1 to 192.168.1.254 to connect to the RDP port using TCP:
$ sudo ufw status numbered
Status: active
To Action From
-- ------ ----
[ 1] 22/tcp ALLOW IN 192.168.1.0/24
[ 2] 3389/tcp ALLOW IN 192.168.1.0/24
I don't think those rules do what you think they do.
sudo ufw allow from 192.168.1.1 to 192.168.1.100
allows connections to ANY port with ANY protocol FROM the single address 192.168.1.1 TO the single address 192.168.1.100 - unless your interface is actually configured on 192.168.1.100 and you have a client at 192.168.1.1 this will have no effect.
On the other hand,
sudo ufw allow 3389
will allow connections to port 3389 with ANY protocol from ANY remote address to ANY local interface.
Probably what you want is either
sudo ufw allow from 192.168.1.0/24 to any port 3389
or (slightly more restrictive)
sudo ufw allow from 192.168.1.0/24 to any port 3389 proto tcp
which will allow any clients on the local CIDR subnet 192.168.1.1 to 192.168.1.254 to connect to the RDP port using TCP:
$ sudo ufw status numbered
Status: active
To Action From
-- ------ ----
[ 1] 22/tcp ALLOW IN 192.168.1.0/24
[ 2] 3389/tcp ALLOW IN 192.168.1.0/24
answered Jan 29 at 23:56
steeldriver
63.6k1199168
63.6k1199168
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1001154%2fhow-to-add-xrdp-and-xfce4-o-ufw-rules%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password