Hello Vijay,

I'm having several comments below :

On Thu, Nov 08, 2018 at 08:21:37AM +0530, Vijay Bais wrote:
> Hello Aleksandar,
> 
> I tried running haproxy as root, but it still failed with same logs.
> 
> Btw, here's the global section used,
> <snip>
> 
> global
>     log         127.0.0.1 local2
>     chroot      /var/lib/haproxy
>     pidfile     /var/run/haproxy.pid
>     maxconn     4000
>     user        root
>     group       root
>     daemon
>     stats socket /var/lib/haproxy/stats
>     stats timeout 2m
>     master-worker
>     nbthread 10

First, I'd be very surprised if you'd need 10 threads for only 4000
connections, please do not add stuff you don't need, this only
complicates the troubleshooting and help people can give you.

>     defaults
(...)
>         default-server          resolvers dns
>
>     resolvers dns
>         nameserver local 127.0.0.1:53 <http://127.0.0.1:53>
>         nameserver ns1   10.0.0.2:53 <http://10.0.0.2:53>
>         hold valid 1s
>
>     listen c1
>         bind   *10.0.0.26:10001 <http://10.0.0.26:10001>*
>         mode   tcp
>         option tcplog
>         server r1 *ifconfig.co:80 <http://ifconfig.co:80>* source *<my Public 
> IP>*

So what this means is that the name "ifconfig.co" will be periodically
resolved using the two resolvers above and that all your connections
will be sent there from your public address. Please make sure that the
source address you're forcing is properly bound on your server, and
usable to reach the address corresponding to "ifconfig.co".

Last, I'm a bit surprised by your statement that you're trying to make a
forward proxy because at least haproxy is not a forward http proxy, so
the term is confusing. Your config makes me think that you want to use
it to always reach ifconfig.co whose address may change overtime, am I
right ?

I'm also seeing that this host resolves both in IPv4 and IPv6. There's
something to put in resolvers sections if you want to force v4 only I
guess but I forgot the option name, you may want to take a look there.

Regards,
Willy

Reply via email to