How can I forward a port from one docker container to another?

Install socat in your container and at startup run socat TCP-LISTEN:3306,fork TCP:B-IP:3306 & This will listen locally on your 3306 and pass any traffic bidirectionally to B-IP:3306. socat is available in package named socat. So you will run any of the below commands to install it $ yum install -y socat $ apt install -y … Read more

Access a localhost running in Windows from inside WSL2? [closed]

Short answer for most recent Windows versions mDNS has been a feature of WSL2 for a while now. Concatenating your WSL2 hostname (or the equivalent command/function in your programming/language environment) with “.local” should get you access. For example, from Bash, try: ping “$(hostname).local” For instance, if your hostname is “MyComputer”, then the mDNS should be … Read more

How can Vagrant forward multiple ports on the same machine?

If you want to forward two ports, you may simply add another line like this: config.vm.network :forwarded_port, guest: 8080, host: 8080 config.vm.network :forwarded_port, guest: 5432, host: 5432 A better way, in my opinion, is to setup a private network (or host-only network), so that you don’t have to forward all the ports manually. See my … Read more

Can I configure a subdomain to point to a specific port on my server

If you have access to SRV Records, you can use them to get what you want 🙂 E.G A Records Name: mc1.domain.example Value: <yourIP> Name: mc2.domain.example Value: <yourIP> SRV Records Name: _minecraft._tcp.mc1.domain.example Priority: 5 Weight: 5 Port: 25565 Value: mc1.domain.example Name: _minecraft._tcp.mc2.domain.example Priority: 5 Weight: 5 Port: 25566 Value: mc2.domain.example then in minecraft you can … Read more

SSH -L connection successful, but localhost port forwarding not working “channel 3: open failed: connect failed: Connection refused”

ssh -v -L 8783:localhost:8783 myacct@server.com … channel 3: open failed: connect failed: Connection refused When you connect to port 8783 on your local system, that connection is tunneled through your ssh link to the ssh server on server.com. From there, the ssh server makes TCP connection to localhost port 8783 and relays data between the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)