LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-30-2007, 12:28 PM   #1
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Rep: Reputation: 30
No proxy for apt-get


I have an iptables redirecting all http traffic to squid port . I want to exclude from this , apt-get.I usually do this by owner match but apt-get is owned by root like many others progs.anyone a better idea ? Thanks !!!
 
Old 01-31-2007, 07:59 AM   #2
runnerfrog
Member
 
Registered: Jul 2006
Location: Paraná, Argentina
Distribution: Frugalware 0.6 (Terminus) - Kubuntu 7.04 (Feisty Fawn Herd 5)
Posts: 217

Rep: Reputation: 31
I don't know how to do that exact thing you want, in my case I just solve the thing the easiest way possible, I make apt go through the proxy modifying /etc/apt/apt.conf and defining an http_proxy environment variable in the system profile.

e.g.,
in apt.conf:
Quote:
Acquire::http::Proxy "http://userassword@domain_or_hostort/";
in profile:
Quote:
HTTP_PROXY=http://hostort
HTTPS_PROXY=http://hostort
FTP_PROXY=God knows what you want there
Cheers.
 
Old 01-31-2007, 08:51 AM   #3
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Original Poster
Rep: Reputation: 30
No i don't want apt-get to use the proxy at all or to be redirected to squid's port by iptables .
 
Old 01-31-2007, 09:04 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Probably that with ipqueue from James Morris you could do this:
http://www.cs.princeton.edu/~nakao/libipq.htm

You will need to program it that's the thing

Here is one example of what can be done:
http://www.nufw.org/-English-.html

With nufw, you can restrict one application or one user to traverse the firewall. Maybe by looking at the documentation you can turn nufw into what you want to do.

It's a rough rough idea, just wanted to point out my first impression.
 
Old 02-01-2007, 01:14 AM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
actually, it's dangerous what you are trying to do.
How would you identify the application?
By inode? By some sort of public private key mechanism?
 
Old 02-01-2007, 02:20 AM   #6
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Original Poster
Rep: Reputation: 30
Well by iptables'owner match for example ... i should make apt-get being owned by an unique owner . --uid-owner , --gid-owner , --pid-owner , --sid-owner . I would point your attention on these last two , could they be a solution ? Pid changes anytime the prog restarts isn't it ? So it's useless . What about the sid ? What is sid ?
 
Old 02-01-2007, 02:33 AM   #7
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
ah!!! I thought your iptables was not on the machine which is a bit more secure and where nufw shows its advantage. The client talks to a remote authentication module that drives a remote firewall (the client + 2 machines are needed then). But even with nufw, when the machine is compromised then an application can act like an authorized application. Its the current limitation of nufw.

You can always modify apt-get so that you first get its pid and add a rule at the same time. or rename apt-get to apt-get-orig and put the script in apt-get which modifies iptables and then calls apt-get-orig. Seems possible?
Changing uid of apt-get is not easy because apt-get needs to have full access to the machine..
 
Old 02-01-2007, 09:08 PM   #8
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Original Poster
Rep: Reputation: 30
How many applications accessing the gateway are owned by root?Not so many isn't it?I'm trying to figure out ... the browser is mine and so all other clients like, gaim ,xchat,gftp,skype . I can't think of any other application apart from apt-get owned by root ... nmap , i use it on the gateway machine ... any other i can't think of ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set up proxy in Apt-Get's apt.conf? rykel Fedora 9 10-09-2013 03:24 AM
apt-get is not working with proxy ALInux Ubuntu 2 11-22-2006 03:21 AM
apt-proxy and cron-apt - download once for the whole LAN Abject Debian 1 06-20-2004 01:53 PM
APT behind a proxy geniarse Debian 4 04-14-2004 09:26 PM
apt-get through a proxy connection? Shade Linux - Software 8 09-13-2003 11:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration