How do I get command line utilities like ping to use the default proxy in Windows XP.
proxycfg -u sets the proxy to the default (IE) proxy alright, but it doesn't seem to be working.
Update: I am behind a proxy and would like a way to check if a site is up or not hence trying to use ping! Also would like a way to telnet (without using Putty) to a specific site and port to check connectivity.
A proxy is usually used for web (HTTP) traffic, ping uses ICMP, which is a completely separate protocol. What, exactly are you trying to do?
So, standard ping doesn't go via an HTTP proxy, as everyone's already mentioned. What you probably want is to tunnel your TCP connections (e.g., HTTP, telnet, ssh) via your HTTP proxy using the CONNECT method. For instance, using netcat (telnet will also work, but netcat's better) you'll do the following:
$ nc yourproxy 3128
CONNECT yourtelnetserver:23 HTTP/1.0
then press enter twice.
There are also tools that can do this for you. Keep in mind that some HTTP proxies are configured to allow CONNECT connections only to certain destinations, for example, to port 443 ony (for TLS/SSL/HTTPS).
Ping doesn't use TCP - it uses ICMP, so using a proxy doesn't really make sense.
Do you have another command line utility in mind?
Your best bet will probably be a command line browser for Windows.
You can try out lynx, which is nearly a full browser, or you can go something simpler and use wget. I would recommend wget myself.
Both programs have some way of configuring a proxy, and the documentation should be the same for both Linux and Windows versions.
Related
I'm trying to download some files using wget but the problem is the files will only download from specific servers how can I use wget over VPN?
p s: I tried use_proxy=yes -e http_proxy=[server]:[port] but it didn't work I need to connect to a VPN server not a proxy
Install a VPN on your machine first, then run the command
Proxies and VPNs are entirely different things. The proxy functionality won't be of any use to you here.
To use a VPN you have to setup a connection at the OS level (i assume linux ? but i could be wrong) - the wget tool itself wont be involved, you'll just run that after your connection is replaced with the VPN connection (no need for any special flags).
As for how you setup the vpn connection, that differs a lot based on the particular details of your situation. It could involve running openvpn yourinfo.ovpn or something like that, or your vpn provider may offer a separate application to set up the tunnel connection and then adjust your OS's routing table so traffic flows through the tunnel instead of to the normal gateway.
I have some issue to configurate Ngrok.
I have installed the Ngrok on linux CentOS server dedicated (IP 192.168.1.124), it works correctly the tunneling is ok.
My question is: how i can reach the web page on 127.0.0.1:4040 in order to check the traffic on my Ngrok server?
The web interface page is only accessible on the server where ngrok is running, but if this is a linux minimal server (without gui and any type of browser) I can't see it.
is there a way to make it accessible also in LAN?
e.g. I have another client that can reach the IP where ngrok is running but if i put on web browser http:\192.168.1.124:4040 nothing is showing.
I see from netstat that this port is not listening so isn't a firewall problem or other.
Is possible to change config of Ngrok? otherwise are there other possibilities ? do i have to use a reverse proxy or something like?
Any ideas?
thanks for your help,
Luca
Locate your ngrok's config file:
$ ngrok config check
Valid configuration file at /home/youruser/.config/ngrok/ngrok.yml
Add to the config file the following line:
web_addr: 192.168.1.124:4040
In case you want to expose it to all interfaces, you can replace that value with 0.0.0.0:4040
I have a local host webserver c++ code which runs on port 8080 on windows 10.
My first task is to test http requests and responses, and it's done properly with Postman.
But I have another task which is to capture those requests and responses via Wireshark(No other packet sniffing application).
Now, as far as I know it's no possible doing it unless one installs a loopback adapter, so I did it. But Wireshark still doesn't capture packets from and to port 8080.
Can sombedy please tell me what other configurations need to be done so it will be possible?
Probably your best option is to install and use Npcap instead of WinPcap. Be sure to install npcap's loopback adapter and capture on that interface and not on the Microsoft Loopback Adapter interface.
Another very good and simple option (if you're not required to use Wireshark) is to use RawCap instead of Wireshark.
Refer to the Wireshark Loopback capture setup wiki page for more details.
I connect to my remote VPS like that:
ssh -f -C2qTnN -D 1080 username#xxx.xxx.xxx.xxx
Then setup Firefox proxy setting to SOCKS5 and 127.0.0.1:1080. That's work.
Now I try to redirect all traffic from my FreeBSD to localhost:1080, but I have no idea. Can you help?
If you want to redirect all traffic, do not use SOCKS5 proxy, but rather use -w option in ssh, which creates something like VPN connection and its own TUN device, which is more suitable for tunnelling system-wide traffic.
There are many examples on the internet, for example here. But this is really advanced use case.
I do know that I can't have two programs listening to the same port, but I am wondering if it is possible to fake it somehow, for an example:
My machine has two applications, one listening to port 80 and the other to port 6653.
If I get an incoming connection, let's say mysite.com:80/chat then it would be forwarded internally to the application listening on port 6653 and the data returned from that server would be forwarded back to port 80 somehow.
The reason I want to accomplish this is because there are many firewalls that seem to block connections to ports other than 80.
I have a chat server that I want to run on port 80, perhaps I could get another IP and machine for that, but it feels like too much trouble for a single chat server.
Any helpful feedback would be appreciated. Thanks!
You can probably do this with mod_rewrite if you're running Apache. That link has plenty of examples, including what you want (I think).
EDIT: I see you've updated the tags to say "asp.net". I'm guessing that you're not running Apache, then. I'm sure there is a similar tool for IIS, or you can use a proxy server that does the same thing.
There is a module called URL Rewrite that you can install on Windows Server 2008 (and R2) that is functionally the same as Mod_Rewrite. Download it here: http://www.iis.net/download/URLRewrite