Ubuntu Networking :: Switch Proxy Using Shell Script?
Oct 7, 2010
How to do this?
Is it possible to manipulate the selection of network proxy through shell script?
What happens How to change the selection of "Default" to "Something" through shell script? What I am trying to say is, I have created a new location called "Something" with HTTP Proxy as proxy and port as 8080. If I am at my home, I use "Default". If I goto my college, I should change it to "something". How to do this via shell script?
In my college many proxy : port (like 184.108.40.206:8080) are using to get Internet connection, performance of each proxy changes, how can i decide which one is working well at particular time. is there any way to switch over them automatically ?
I am working on fc10. I connect to internet using two connections: with proxy and without proxy. Initially I had some problem in configuring yum for proxy and I resolved it by creating files proxy.sh and proxy.csh in /etc/profile.d with the required details (export_proxy).Now when I connect to my connection without proxy I have some problems .Whenever I try to do yum update I get the following error:
"[URL]: [Errno 12] Timeout: <urlopen error timed out> Trying other mirror. Error: failure: repodata/primary.xml.gz from adobe-linux-i386: [Errno 256] No more mirrors to try." what changes do I need to make in order to use yum in the connection without proxy?
Is there any way I can switch my desktop shell from unity to, say, gnome-shell? I can switch using other console shell I like (bash, csh, fish, etc.). Assume that there is a stable alternative desktop shell, I should be able to choose, too.
(For console shell, we goes to /etc/passwd. But for desktop, I can't find the way to config.)
I am wondering if I can open a shell or new terminal thing from within the terminal in a unix/linux enviroment. Particularly a commandline only one where there is no GUI. Is this doable? how do I do it?
Ever since I upgraded to Natty / 11.04, the quality of my desktop experience has dropped sharply.
One thing that effect me greatly is that I can no longer conveniently switch my network proxy on or off system-wide with single click.
Back in Maverick / 10.10, I could launch gnome-network-properties and switch it back and forth depends rather I am at work or at home.
I have found a similar application, "gnome-control-center network," on the surface of it, it seems to replace "gnome-network-properties" in Maverick. Except that this application doesn't seems do ANYTHING.
As result, I am having the hardest time switching my proxy settings, as I have to do so per application basis (gpodder, pidgin, aptitude, thunderbird / firefox, etc).
ps. I am using Gnome "classic" but Gnome 3 suffers the same issue
In my college many proxy : port (like 220.127.116.11:8080)are using to get Internet connection, performance of each proxy changes, how can i decide which one is working well at particular time. is there any way to switch over them automatically?
I have a big problem here.I have 2 shell windows, ne is a root shell and the other with some user account.If I change the root password in the root shell window aspasswd rootI can change it, but when I go into the user shell window, and I do "su" I cannot switch to root. Always "incorrect password".Same happen if I try to do "su <some-other-user>"This happen ONLY in shell windowws. If I try, for example, to run some administration service, like system-config-service, the root password is accepted in the prompting window.
At the moment I have a proxy and all the users have to configure it in the browser to access internet. I want to make the users able to browse even without configuring the proxy in the browser. but eventually it should be received in the proxy rather than giving an error to the user. I heard with transparent proxy I can redirect all the traffic from a particular network, to a particular host( ie my existing proxy).
I tried this using firewall rules. But then the existing proxy doesn't understand the protocol of the requests. I heard that it should be in the kind of proxy protocol.
I successfully installed Ubuntu 10.04 on 2 laptops (both are identical in terms of hardware). In addition, I connected both of them (using RJ45 cables) to a switch (just a switch; I don't have a router). Can anybody guide me what should I do / what settings should I specify in each laptop in order to be able to SSH from one laptop to another?
I've been trying to make myself anonymous, but I cant find 'Tor' anywhere, tried 'yum & kpackagekit' neither have it. I did find 'Privoxy', installed it, set proxy for HTTP and HTTPS in Firefox, but it says 'unknown proxy' when I try to use it! I've been to the Privoxy web site and read through the 'User manual', but most of it is 'geek' to me!
I just installed the Lucid server, set IP address, Default gateway and Preferred DNSs and need to be able to use apt-get. Right now this is not possible and my guess is that I have not set the proxy used in my LAN (which is 192.168.255.60:8080) cause I have no clue how to do it.I can ping every other machine locally but not on the Internet...
I am trying to set up my squid3 proxy as a transparent proxy - right now, I have to manually configure browsers to access via proxy. I understand that I have to put some rules into Iptables and also some further directives in the squid.conf.
I have a couple of specific questions. The proxy server is running on a Ubuntu 10.04 workstation and this machine also acts as a dhcp server for the network. I have just one subnet , namely 192.168.0.1-254 There is only 1 network card. Is it much easier to put in a second network card or is it just as easy to configure the existing lan card as a dual IP?
Is it necessary to configure these 2 IP's ( whether they are via 2 lan cards or dual IP on single card ) to be on different subnets. i.e ETH0 192.168.0.1 and ETH1 192.168.1.1 or is ok to have something like ETH0 192.168.0.1 and ETH1 192.168.0.254 ( where ETH0 is the one facing the LAN and ETH1 points to the modem router / switch i.e The Internet ) Where specifically do I save the Iptables rule configuration file and what must I call it ?
I have 2 NIC's in my mythbuntu 10.0.4 box, one is connected to a closed network eth0 and the other to an Internet gateway eth1.
For some reason Ubuntu always makes eth0 the default network card, even if I delete the connections and add them in different a order. Because of this I can't access the Internet w/o disabling the private network card.
I could just switch the cables over but this should be doable in software and I'd like to know how.
I have an HP ProCurve 2424M 24 port switch and I can't access it through the browser because I can't find the IP address of the switchhave tried resetting back to factory configuration, but still can't find the IP. So I have a null-modem cable (serial) and am trying to get into the switch via the terminal. The only thing is that I don't know what commands to type? Do I need to configure the port? If so, how do I do that? I'm not necessarily a newbie to Linux, but when it comes to the terminal
I've been doing some security testing in a lab environment that does not have direct internet access. It's actually a little complicated: From home to connect to my lab machine, I
1. SSH to machineA. 2. SSH from machineA to machineB
where machineB is my actual lab machine. neither machineA or machineB allow anything other than SSH, and machineB is only accessible from machineA. However, I really need to run yum on machineB. I have managed to get internet access via Firefox on machineB by creating a series of SOCKS proxy via SSH.
where machineC has internet without limits placed. This is the only way I have managed to get internet working. I tried using ssh -L all the way from machineB->machineA->machineC but it didn't work (even when setting Firefox to use http proxy). I tried using ssh -D all the way, but again that doesn't work either.
I do have access via Firefox using socks proxy. However, yum update fails to retrieve mirror list, and from what I have found I don't believe yum supports socks proxy directly. Instead, it uses http_proxy / ftp_proxy. how to get yum to go out over the SOCKS proxy I created (same one using in Firefox)? It seems like since Firefox can access the internet and everything without issues, i should be able to get yum to tunnel through the same connection to access everything.... I tried
is there a way to force wget to use a specific squid proxy when making connections ? - I use a squid proxy normally, but I need this specific request to go via a different one. I dont have to use wget, I just need a way to test squid's blocking rules by requesting various pages through it, this proxy is not my normally proxy on the network and so I cant rely on wget taking the environment variable.
Also, this is as part of a script, so anything that avoids editing wget config files would be best. - Perhaps curl can do this ? - currently im using the exit code of wget to determine if the connection was made.
I'm having an issue on multiple Lucid boxes where I can't get proxy ARP to work. This is to be used in conjunction with openswan IPSec. I've enabled forwarding and disabled sending/accepting ICMP redirects for each interface as per openswan's requirements. I've added the proxy arp lines for all, default, eth0, and lo to sysctl.conf:
Code: net.ipv4.conf.eth0.proxy_arp = 1
I then connect the IPSec client, and I have connectivity to the server. When I try to ping (or otherwise access) something else on its subnet, I reach the intended target, but then it ARPs for the sending machine, and the Ubuntu server doesn't respond to the ARP.
I have an ARP entry that looks like this, added via arp -s 192.168.254.100 -D eth0 -i eth0 pub:
Address: 192.168.254.100 (the correct virtual IP for the client) HWtype: * HWaddress: <from_interface> Flags Mask: MP Iface: eth0
Best I can tell, everything is in order... I can listen in with wireshark on the server and see that it's receiving the ARPs, but I can't get it to respond to them.
On Ubuntu, I know that a user can set a global proxy setting (through a gui, Network Proxy) which will affect all protocols (right?). However, I have set up a server box (no gui) and would like for most of its ports to not go through a proxy. Instead, I'd only like the activity that transmission-daemon does (but not the web UI) to go through a proxy. Is this in any way possible?
I have been struggling to configure a squid proxy server on my ubuntu 11.04 VPS.
Following these instructions[URL].. it is all good BUT I don't want to have to SSH tunnel into the server. Just want to have a proxy set in my proxy server settings in firefox/chrome. Even lock the proxy to certain static IP addresses so no one else can use it except IPs I designate.
1. Can this be done without a VPN or SSH tunnel ?
2. What is the best way to put some security on the proxy server ?
how to make wifi work. I'm looking for a way to turn it off to save battery life. Aspire One D255, Fn F3 toggles wifi off and on, with an indicator light and, in Win 7, an on-screen indicator. Fn F3 doesn't work in Ubuntu, and there are times I'd like to turn the wifi off. Is there a command to do this?
I got a Ubuntu machine running a local web server. It is connected to an archaic 10mbit hub, and I'd like a little bit faster network. I got a new 100/1000mbit switch connected to my router. I have 3 other PC's running off it, no problems at all. No configuration was necessary, and all existing cables worked fine.
Since the router and hub are located at the opposite end of the house, and the switch is in my PC room, I made up a new cable to connect it to my Ubuntu machine. It's just a straight-through cable, just like the other cables connecting the switch to other PC's. Okay so, when I plug the cable in to the machine I get no ethernet lights on either the machine nor the switch. But here's the kicker: I plug the cable into my laptop (running Windows 7), and it works perfectly. I restart the machine with the cable in, and get a green light. As soon as Ubuntu loads up, no lights, no connectivity. It shouldn't matter, but I'm running a static IP on the machine. I also have static IP's on the other PC's connected to the switch and nothing had to be changed.
I just installed 10.10 on my HP dv2700 laptop and I can't get the wireless card to turn on. Here are some of my results. I get the same results regardless of which position the wireless switch is in and the indicator light always indicates that the wireless is off.
paul@paul-HLaptop:~$ iwconfig lo no wireless extensions. eth0 no wireless extensions. wlan0 IEEE 802.11abg ESSIDff/any
I searched for this, and all I saw was advice on how to make wifi work. Mine works just fine, I'm looking for a way to turn it off to save battery life. Here's what I mean. Aspire One D255, Fn F3 toggles wifi off and on, with an indicator light and, in Win 7, an on-screen indicator. Fn F3 doesn't work in Ubuntu, and there are times I'd like to turn the wifi off. Is there a command to do this? Or maybe something in the menus that I'm missing?