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 - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-08-2007, 01:25 PM   #1
mariusek
LQ Newbie
 
Registered: Jan 2007
Posts: 8

Rep: Reputation: 0
where put in the proxy server-name


Hi,

Im connecting with Internet via a proxy server. (Akademic Campus).
Where should I put a proxy-name and port number in Debian. Without this I can't use a apt-get command and I can't even ping a www site.

Last edited by mariusek; 01-08-2007 at 01:35 PM.
 
Old 01-08-2007, 01:55 PM   #2
nirmaltom
Member
 
Registered: Jun 2005
Location: India
Distribution: Redhat,Fedora,DSL,Ubuntu
Posts: 238

Rep: Reputation: 30
hi ,
goto edit->preferences in mozilla firefox,there u can find connection settings button , click that and give ur proxy address and port no
regards,
tom.
 
Old 01-08-2007, 02:01 PM   #3
mariusek
LQ Newbie
 
Registered: Jan 2007
Posts: 8

Original Poster
Rep: Reputation: 0
In Web Browser it ist everything allright. Problem is to make it in the Terminal, so the apt-get command would be properly perfomed.
 
Old 01-08-2007, 02:15 PM   #4
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
Hi, be welcome.
To be able of running a command throu a proxy without writing its address every time you type it, better define proxy address and port in your profile file, e.g,:
HTTP_PROXY=http://192.168.1.1:8080
HTTPS_PROXY=http://192.168.1.1:8080
FTP_PROXY=http://192.168.1.1:8080
Replace ip and port with the one applicable to your case.
Then you can edit your /etc/apt/apt.conf file:
Acquire::http::Proxy "false";
Change "false" for "true"
You have options to not use the proxy cache, edit the timeout, ftp access, etc. For better results read the "man apt.conf".
Cheers.
 
Old 01-08-2007, 03:01 PM   #5
mariusek
LQ Newbie
 
Registered: Jan 2007
Posts: 8

Original Poster
Rep: Reputation: 0
I made as u said but still doesn't work. In Browser it is ok. But in console not. When I ping any www-site I have no response
 
Old 01-08-2007, 04:03 PM   #6
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
OK, you are having networking newbie behaviour. I see what you call Proxy is possibly your gateway too, as far as you didn't say if you configured your gateway, pay attention to this:
- If you don't read much and you are in a hurry:
# route add default qw ${GATEWAY} metric 1

Understand? You add your default gateway to your network configuration there, replace ${GATEWAY} with your gw ip. Proxy and Gateway are two very different concepts.

- But, if it doesn't work and you want something more "static", instead of typing the command above avery time you get to your campus network:
In your /etc/sysconfig/network (I don't know if it exists in Debian, debianites needed here):
NETWORKING=yes
HOSTNAME=yourbox.yourcampus.com
GATEWAY=192.168.1.1 (the ip of your campus gateway)

In your /etc/hosts:
127.0.0.1 localhost.localdomain localhost
192.168.1.1 yourbox.yourcampus.com yourbox yourcampus.com

In your /etc/resolv.conf:

# search for resolution in your campus if needed, if not, comment it.
search yourcampus.com
#
# Replace the next one with your campus DNS ip, if needed, if not, comment it.
nameserver 192.168.1.1
#
# ISP DNS ip's if needed, if not, comment it.
nameserver 200.33.213.66
nameserver 200.33.209.66

Orrr... you can use some script, under your own risk:

#! /bin/sh
inconfig lo 127.0.0.1
route add -net 127.0.0.0
IPADDR=192.168.1.10
NETMASK=255.255.255.0
BROADCAST=192.168.1.255
GATEWAY=192.168.1.1
ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add default qw ${GATEWAY} metric 1

... defining all the ip's and the ethX device in the script file.

I'm tired of writing, you _have_ to give me more data if you need more help.

EDIT: Being a campus network there is a big chance of having dhcp available, you can configure your device, let's say eth0 with "dhclient eth0" for having all the network services available, like internet access.

Last edited by runnerfrog; 01-08-2007 at 04:12 PM.
 
  


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
squid proxy server configuration & distribution of internet without proxy gaurav_gupta082 Linux From Scratch 2 07-31-2010 11:25 AM
howto join IRC server using proxy server in irssi? kaplis Linux - Software 2 08-01-2006 04:00 PM
configure redhat enterprise server 4 as Router and Proxy server amdattani Linux - Networking 0 06-15-2006 05:50 AM
how to put files on the ftp server bry21 Linux - Networking 5 01-25-2006 12:11 AM
Best info to setup a ftp server behind the proxy server. bruse Linux - Networking 1 12-14-2005 04:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:19 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