?
Solved

FTP from behind a proxy

Posted on 2006-04-13
10
Medium Priority
?
1,229 Views
Last Modified: 2012-08-13
I am having trouble with FTP and Remote Desktop etc proxy settings. I am inside a corporate network and Web Browsing works fine as I set the proxy details within the browser. On windows I was able to FTP and Remote Desktop. This has been allowed corporately for my IP address - so basically my IP is allowed through the firewall.

FTP and RDP work within my local network but do not go out to the internet.

I think it is a proxy problem so I have added:
export http_proxy="http://192.168.8.249:80/"

to 3 different files:
/etc/environment
/etc/profile
/etc/bash.bashrc

After this wget seems to be working at the command line but FTP does not. When I type :
wget 123.124.125.126
it works fine but when I type
ftp 123.124.125.126
it does not work with an error 'Network is unreachable'.
Although ftp to a machine on my same subnet works e.g. ftp 192.168.1.2

 I need to know what to put in to these files so that FTP, RDP, TELNET etc will go through the proxy also.

I'm not sure if the following is possible:
export rdp_proxy="rdp://192.168.8.249:80/"

My question is: Do I need to set http_proxy, ftp_proxy and even rdp_proxy somewhere to get this running?
0
Comment
Question by:jonnymccullagh
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 16

Expert Comment

by:xDamox
ID: 16445496
Hi,

To make the affects system wide you can put it in either /etc/bashrc or /etc/profile

if however you want to make it local to you edit the ~/.bashrc file and append your varibles here are the ones you will want:

http_proxy="http://192.168.8.249/"
https_proxy="http://192.168.8.249/"
ftp_proxy="http://192.168.8.249/"
rdp_proxy="http://192.168.8.249/"

export http_proxy https_proxy ftp_proxy rdp_proxy

if the above has been added you your ~/.bashrc file every time you login these variables will
be set
0
 
LVL 2

Author Comment

by:jonnymccullagh
ID: 16446705
Ok I added:
http_proxy="http://192.168.8.249:80/"
https_proxy="http://192.168.8.249:80/"
ftp_proxy="http://192.168.8.249:80/"
rdp_proxy="http://192.168.8.249:80/"

to .bashrc
rebooted then at the command line did export ftp_proxy

and I still get the error message "ftp: connect: Network is unreachable" and a similar message using rdesktop.
I'm lost - although I am a wee bit suspicious about my network settings which have my IP address as 192.168.8.187 but under advanced has Broadcast: 192.168.8.255
Does this mean that proxies/firewalls see me as 192.168.8.255 rather than my real IP address?
Thanks for the help,
jonny
0
 
LVL 16

Expert Comment

by:xDamox
ID: 16447370
Hi,

Whats your Proxy servers IP address? also try pining it to see if you get a reply.
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 27

Expert Comment

by:Nopius
ID: 16451733
rdp_proxy="http://192.168.8.249:80/" this line has no meaning, since rdesktop doesn't use any proxy variables and cannot connect via http:// proxy

also 'ftp' client don't know about ftp_proxy variable. That's why it says 'ftp: connect: Network is unreachable'

There is a list of utilities, that use *_proxy env variables:
lynx
links
wget

so you may use 'links ftp://remote.site.com/' for browsing remote ftp directory and downloading some files
or 'wget ftp://remote.site.com/remote.file.tar.gz' for retrieving file
0
 
LVL 27

Expert Comment

by:Nopius
ID: 16451743
You may also setup your Mozilla browser to use http:// proxy for ftp transfers.
0
 
LVL 2

Author Comment

by:jonnymccullagh
ID: 16451823
OK maybe my inability to FTP and Remote Desktop is a symptom of a wider problem?
I am able to ping addresses in my own subnet only (inc my proxy) - I cannot ping to addresses on other networks on my WAN which I should be able to.
Maybe there is something else I should be doing for network settings?

Using kubuntu if it is important.
Thanks,
jonny
0
 
LVL 27

Expert Comment

by:Nopius
ID: 16458664
Ok, it may be a bigger problem.
Now some questions:
1) Do you administer that proxy?
2) Does your proxy also a default router of your network?
3) Do you use private IP addressing inside LAN?
4) What is a netmask of your LAN?

If you don't know answers to these quistons or they seems have no meaning, then you have a  problem :-)

If you know all the answers:
1) Check that netmask and default router in your machine is the same as on your proxy (if proxy is inside your LAN)
2) Check if your default router also doing NAT if you are using private addresses inside your LAN
3) Check if firewall (either local or on rouyter) permits your traffic to go outside your router.
4) Check you have valid DNS-es in /etc/resolv.conf
5) Check accessability of your router 'ping it'
6) Check accessability of your DNSes (if they are external), also ping them and 'nslookup google.com'

If all checks are OK, then I see no problems.


0
 
LVL 2

Author Comment

by:jonnymccullagh
ID: 16732341
I got to the bottom of this problem myself after finding this article:
http://www.ubuntuforums.org/archive/index.php/t-25915.html

Apparently Kubuntu has a bug with holding on to the Gateway address so I had to manually add the gateway address to get FTP and RDP working.
0
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16754373
PAQed with points refunded (125)

GranMod
Community Support Moderator
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month15 days, 16 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question