How to authorisation resctricted access to public_ip:port/extension url in Ubuntu?


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu How to authorisation resctricted access to public_ip:port/extension url in Ubuntu?
# 1  
Old 07-19-2014
How to authorisation resctricted access to public_ip:port/extension url in Ubuntu?

Hello,
I am dealing with live video streaming server and have no problem with video quality. The main issue is that I am unable to restrict access to related address.

Apache2 is installed into system.

My objective is to make it "authorisation restricted access". There should be a username : password database and when somebody tries to login through that port nr, url query will be carried out and user wiill be accepted when user : pass
are matches.

Stream link is in below format:

Code:
http://public_ip:port/test

What I need to do is to convert it into this one:

or

Code:
http://public_ip:port/test?u=user:p=password

I read many different topics but I could not find the answer of my question; from where I should start up to proceed. Do you think that apache mod_proxy or nginx would be a solution for this? Or is there a much simpler way to achieve my aim?

PS: .htaccess and .htpasswd files are not solution for this case because port nr is not "80"

thanks in advance
Boris

Last edited by baris35; 07-19-2014 at 03:46 PM..
# 2  
Old 07-19-2014
Checkout <Directory> block in the main Apache configuration,

Configuration will be something like this

Code:
<VirtualHost *:8080>
...
...
# Private access
<Directory /var/www/yoursite/userdirectory>
    AuthUserFile /path/to/.htpasswd
    AuthName "Some Name"
    AuthType Basic
    require user <username>
    deny from all
    allow from <allowed ip>
</Directory>

# Public access
<Directory /var/www/yoursite/public>
    Satisfy any
</Directory>
...
...
</VirtualHost>

# 3  
Old 07-19-2014
Quote:
Originally Posted by Akshay Hegde
Checkout <Directory> block in the main Apache configuration,

Configuration will be something like this

Code:
<VirtualHost *:8080>
...
...
# Private access
<Directory /var/www/yoursite/userdirectory>
    AuthUserFile /path/to/.htpasswd
    AuthName "Some Name"
    AuthType Basic
    require user <username>
    deny from all
    allow from <allowed ip>
</Directory>

# Public access
<Directory /var/www/yoursite/public>
    Satisfy any
</Directory>
...
...
</VirtualHost>


Hello,
Thanks for your reply but port nr cant be 8080 or 80. For example, assume that I will forward my stream to port 14001.

Code:
http://111.222.11.22:14001/test_movie

At client side, user should enter above url in this format:
Code:
http://user:pass@111.222.11.22:14001/test_movie

( I incidentally left space between : and p . When there is no space, smile-face comes out)

In my case .htpasswd and .htaccess files are not working for access authorisation. User will connect to server through VLC player by typing that url and each user will have different username and different password.
If you have an idea about how it can be done, I would like to get your thought. As I am not certain on which field i should try to work/learn details, your thought would be helpful.
Some persons says "cgi-bin" do this task, some others say "no, the best solution is apache mod_proxy" and some says "you should create an html file in your web directory and you should compile your binary file and connect your html to your binary file" but i do not know which one is the right answer. Maybe the fourth answer would make my task much more easier.


Thanks in advance
Boris
Moderator's Comments:
Mod Comment I removed the spaces around the colon in your sample address and added CODE tags as required by forum rules.
Smilies are not expanded inside CODE tags.

Last edited by baris35; 07-19-2014 at 03:45 PM.. Reason: Fix tags, remove spaces added to avoid smilie expansion.
# 4  
Old 07-26-2014
Moderator's Comments:
Mod Comment
Code:
This made your post unreadable and was unrendered, comes out as a block junk:

p { margin-bottom: 0.21cm; direction: ltr; color: rgb(0, 0, 10); line-height: 120%; text-align: left; widows: 2; orphans: 2; }
p.western { font-family: "Calibri",serif; font-size: 11pt; }
p.cjk { font-family: "WenQuanYi Micro Hei"; font-size: 11pt; }
p.ctl { font-family: "Calibri"; font-size: 11pt; }
a:visited {  }a:link { color: rgb(0, 0, 255); }

[


Thanks. This is very useful post authorisation resctricted access to
Code:
public_ip:port/extension

url in Ubuntu. It is just awesome.

Moderator's Comments:
Mod Comment Please do not attempt to format your posts, use the tools provided instead. Thanks

Last edited by jim mcnamara; 07-26-2014 at 11:45 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Ubuntu

How to access website without port in Ubuntu 14.04?

Hello All, I am trying to open a webpage in ubuntu browser "xxx.com:8008" which works fine but i would like to open it without having to mention the port, Is there anyway in ubuntu where we can access the website without having to mention 8008 port.Thanks in advance. (2 Replies)
Discussion started by: gull05
2 Replies

2. Shell Programming and Scripting

HTTP::DAV module errors - can't access URL

Hello, I am attempting to use the HTTP/DAV module in perl, and I have a script that transfers files to a website. However, I get the following error message: "Couldn't open https://www.thisismyurl.com/DAV: The URL "https://www.thisismyurl.com/DAV" is not DAV enabled or not accessible." ... (0 Replies)
Discussion started by: Scatterbrain26
0 Replies

3. Solaris

Why I cannot access internet from Solaris guest using url?

Hi all, I'm using virtualbox bridged adapter Host:Windows 7 Guest: Solaris 11 while I can ping between the host and guess, I cannot access the Internet from the solaris guest. here's my settings: while I can ping 173.194.38.128 (which is actually google.com), I cannot ping... (3 Replies)
Discussion started by: jediwannabe
3 Replies

4. IP Networking

VPN ssh access over RDP port?

Guys, Can I use an open RDP port to gain ssh access to my Linux server running the other side of our firewall? I work from home on the odd occasion, we only have RDP port 3389 available once logged into the VPN. I would rather ssh into my workstation without the need for a desktop display. ... (3 Replies)
Discussion started by: general_lee
3 Replies

5. Cybersecurity

Limit access in Ubuntu

can we use semantec or any kind of software in ubuntu/linux to limit access of a user to edit a specific file? example::: a. will not play media player or use usb. we will edit blacklist.conf to do this. however user should still be able to do apt-get install, shutdown, edit other files etc.... (1 Reply)
Discussion started by: lhareigh890
1 Replies

6. UNIX for Dummies Questions & Answers

Check the URL is alive or dead with port number

Hi, I am running certain weblogic instance, in which it's hard to find which instance is stopped or running after stopping the weblogic , cause process status is for all the instance is same. A URL which shows the instance is stopped or running. But i have major challenge to check it through... (2 Replies)
Discussion started by: posix
2 Replies

7. Ubuntu

no wireless access on my laptop in ubuntu 9.10

Hii i have installed ubuntu 9.10 and my hp laptop has a wireless (this one works just like the normal volume button touch screen if u touch it wireless works or else it doesnot ) now after installing ubuntu it glows always red and never turn blue.. i have windows 7 on other partition it... (0 Replies)
Discussion started by: phoenix_nebula
0 Replies

8. UNIX for Dummies Questions & Answers

restrict tcp-port access

Hi Is there any way to restrict the TCP-IP port usage. I want to restrict TCP-IP port 1500/1550 to the oracle osuser. Tanks in advance. Remi (2 Replies)
Discussion started by: remivisser
2 Replies

9. UNIX for Dummies Questions & Answers

console access via serial port - settings

looking for the answer to console port access via 25pin serial. Can i tip in from another unix box for access? (5 Replies)
Discussion started by: simplimarvelous
5 Replies
Login or Register to Ask a Question