Proxy over a proxy in linux - linux

How to use two proxies with authentication in a linux terminal?
My college uses cyberroam with squid proxy server and it blocks all legitemate terminal requests such that basic commands like apt-get install libvirt kvm dont work.
So i was thinking of either running a vpn or a private proxy server on google app engine and connecting to it via the terminal but i need to go through the squid proxy to reach the internet.
Any ideas as to how to implement this.
PS: We already tried reasoning with the college authorities they say they cant help directly but we can always bypass it wihtout their knowing. And we really need this for our project so please help. Thank you

I'm not sure if NTLMAPS will work for you but it works for me on bypassing company proxy with the use of public proxy servers.
Another thing, my friend's company is using domain controller to authenticate internet users and he told me that NTLMAPS also works for him and able to access the net via linux terminal.
Good luck.

I setup the proxy in my ubuntu machine as below:
https://gopukrish.wordpress.com/2014/05/22/configure-proxy-in-ubuntu-14-04/
Following are the contents in-case the link becomes unusable in future.
Download and install cntlm package from : http://sourceforge.net/projects/cntlm/
Edit /etc/cntlm.conf
Give credentials in the below fields
username
domain
password
proxy IP:Port
Note down the Listen port… say it is 3128
save
Select Network options in Ubuntu and choose network proxy
Give 127.0.0.1 port 3128 for all the protocols
/etc/init.d/cntlm restart
This worked for me after the restart

Related

Is there any way to force a program/software to use system proxy in Linux?

I am working on a Java project in Intellij Idea (Linux) that needs to access websites through a proxy. I have a personal proxy subscription to use and I can request through it programmatically with something like -
HttpHost proxy = new HttpHost("PROXY_SERVER", PORT);
String res = Executor.newInstance()
.auth(proxy, "USER_NAME", "PASSWORD")
.execute(Request.Get("https://example.com").viaProxy(proxy))
.returnContent().asString();
System.out.println(res);
However, if I use the proxy in the etc/environment with http(s)_proxy or through ubuntu network proxy from the settings, my browsers and some of the system programs such as - Chrome, Firefox use the proxy while making any requests but Intellij Idea doesn't follow the system proxy. I've tried to set it manually from IDEA settings but it doesn't work. The requests are always going from my current IP. So, I was curious if it is possible to force a software in Linux to use system proxy somehow. I need to mention that, I have tried proxychains but it didn't work, my server wasn't recognized. Any kind of help/suggestion will be appreciated as I have a little or no experience in networking.

Squid Proxy Server Admin Interface

My client has Squid proxy server and it is working fine. But to see the access log and other changes, we have to go through only with Command prompt. Moreover I am new to the Squid server.
Client wants me to check for Administrative interface to see how many people are using Squid server? To get know the browser information they logging? And other data like Webalizer.
So my question is, is there any admin interface to install in Squid server?
Squid cache provides a basic web interface for stats via Cache Manager.
Presuming you have a default install start by checking for the following file which you will need to edit to allow yourself access to the interface by setting the allow from line;
/etc/httpd/conf.d/squid.conf
Once you have reloaded your web server config you should be able to navigate too; http://<your host>/cgi-bin/cachemgr.cgi
You should then be able to access a number of stats and counters.
If you prefer squid also supports snmp via the config file at; /etc/squid/squid.conf where in you should add the following section (Customising as required)
snmp_port 3401
acl snmppublic snmp_community public
snmp_access allow snmppublic
snmp_access deny all
snmp_incoming_address 0.0.0.0
snmp_outgoing_address 255.255.255.255
Information and the OID values can be found in the docs here.

nodeJS alternative to IP-Adress or localhost? Avahi-daemon

I am using Nodejs with the express, bcrypt and body-parser packages on an ubuntu linux system.
Everything works fine so far.
However, I´ve been wondering if there is an easier way to connect to my website.
Until now, I have to type in my IP adress, e.g. https://XXX.XXX.XXX:3000 to actually see the content.
I´ve already tried avahi-daemon but did not get it work. Whenver I try 'hostname.local' I get the same error: Firefox is unable to connect to server.
However, using the IP-Adress: https://XXX.XXX.XXX:3000 works.
I would like to access my NodeJS sever with something similar to: computername.local
FYI: I just want to use it in my local network at home.
Does anybody have any idea how to get this work?
You have a couple choices. The easiest,if available, is probably to setup your home router to always assign it the same IP address (how to do that will vary based on your router). If your router has it available, you could also set a host name for it there in DNS settings.
If your router doesn't have DNS settings available, then you can add a line to each of your home computers /etc/hosts file (if memory serves Windows has it in C:\etc\hosts). Let's say the IP you give the server is 172.16.1.11, your hosts entry would be
172.16.1.11 computername.local
You could also setup your own DNS server in your house, possibly even on the same machine as has your node app, and then configure it to handle the one address before forwarding DNS requests for others to your ISP but that seems like overkill if you have just one app.

WiFi server in NodeJS

What I want to do is write software in NodeJS to set up a WiFi server similar to those they use at cafeterias (with WPA2 security or something similar) and guests can connect with credentials or for free on my computer. (I am extra curious as to how I can redirect guests to an html page to enter credentials like they do on some places)
Is there a Node plugin(s) that help with something like this? If not, I am looking for advice like this:
Set up a server on port x and use npm package y and z
Check out this project
More info:
I am creating an intranet for academic purposes.
I have written a dns server in my computer in NodeJS that listens on 192.168.2.2:53 for UDP/TCP and successfully resolves domains in my private network.
My computer is a DHCP client of my Router device which provides access to the internet. Devices at home that use my private DNS server will resolve their dns requests to the internet, only if not found in my private dns.

How to reset the VPS server to original state using SSH

My client recently purchased a VPS server and started configuring the WHM/cPanel related settings and unfortunately mis configured it (added a wrong DNS/ip details/and cpanel settings.) to an extent that its not reconfigurable through WHM login.
Although, the SSH connectivity is intact and works fine so far. Now, I would like to know if there is a way to reset the VPS back to its original state so that we can start configuring the WHM login again.
additional info : This is a linux host and I am able to login via ssh as root and operate. As far as I understood from my client we have added wrong domain name,some 5 Ips.
Thanks in advance.
Please let me know if you need any additional information from my end.
Try to login your server through WHM with http://serverip:2086 URL and removed your domain which you have added wrong and delete the IP's from WHM,
And if you want to reinstall your VPS, Than you will have contact your VPS provider. They will reinstall your server so that you can start it again.

Resources