I am working on a project where my software is trying to connect a server running in public domain on some unusual port. ( I have set this server in public domain myself ). My corporate firewall does not allow me to connect to this server on this unusual port. So I have configured web proxy on the same machine where my server is running (i.e web proxy and my server both have same IP address), with the hope I will use this web proxy to access blocked port from my corporate network.
Now the problem is, my web-proxy does allow me to access everything else (i.e It is providing me anonymity very well) but when I try to access the server (which is running on the same IP address), I am unable to access it via web-proxy. I have allowed just my corporate IP address in the web-proxy to allow access and deny everyone else. Give is the configuration of Squid.
acl cspnet src A.B.C.D/32 http_access allow cspnet # And finally deny all other access to this proxy http_access deny all http_port 8080 coredump_dir /usr/local/squid/var/cache/squid # Add any of your own refresh_pattern entries above these. refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern . 0 20% 4320
I don't want to configure Squid to work as accelerator for my server, I just want to access the unusual port of my server from my client from my corporate network. A.B.C.D is also the IP address where my server is running. I have also tried things like
acl safe_port port X & http_access allow localhost
But nothing seems to work. The same server is running on another IP address in public domain (which I have set-up), and with my web-proxy (which I have configured above) I can access that server (which is bind to a different IP address) from my corporate network, but not this one which lies on the same IP address. Any thoughts ?
Here is some more information. The client software which is trying to connect to my server is running on a console based (no interface available) embedded linux box. I think usage of SSH Tunnels will require me to first login via SSH tunnel (using some SSH client - i.e Putty) on the box and then I can run my client software. Secondly I can add support in my box software to login via SSH Tunnels but I don't want to waste time on this effort. I am not sure if connecting with SSH Tunnels can be seamless so I think the better solution is just to configure my linux box to use web proxy as system network configuration so that all network access are made via web proxy.
Ok. I have tried removing everything from the squid.conf and just left
http_access allow all
I am still not able to access to the server running on the localhost. That means problem is not in the squid.conf, I need to add something else somewhere to allow access of the server running on localhost via squid.
Ok. Another test. I also have a webserver (apachi) running on my server machine. Via web-proxy when I have tried to access my webserver, I have got my page. That (I believe) confirms the problem lies somewhere in my server which I am trying to access or not ? The server I am trying to access is listening on 9000 port.