[Net-ssleay-devel] Net::SSLeay: is it possible to set get_https bound to specified source.

sampo at zxidp.org sampo at zxidp.org
Thu Nov 25 15:40:28 UTC 2010


=?windows-1251?B?0eXw4+Xl4iDR5fDj5ekgzejq7uvg5eLo9w==?= <ssnnss at bk.ru> said:

> Hello!

> 

> Net::SSLeay is a great module making my life more simplier.



Please ask questions on mailing list (Cc'd) so others can learn from the answers. Do not

send direct mail to me.



> But I have a multihomed server, connected on two different ISPs.

> And I need to have a possibility to decide, which ISP to use for my task.

> So is it possible to set get_https bound to specified source?

> May be some low level API?



No lower level api. You realize that get_https() is client interface. It does not listen

on any port or interface.



If you want it to originate the connections from a particular interface on your system,

you need to arrange the appropriate route to go through that interface. Usually

this is the default route. You can see routes with



route -n



Which could return for exampe:



Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.100.0   0.0.0.0         255.255.255.0   U     0      0        0 wlan0

10.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 eth0

127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

0.0.0.0         192.168.100.1   0.0.0.0         UG    0      0        0 wlan0



Here you can see default route (0.0.0.0 in first column) pointing to interface wlan0. 

If you wanted the connections to go out through eth0 instead, you would need

to make the default route pass through that, e.g.



route del default; route add default gw 10.16.1.1 eth0



This is Unix sysadmin stuff and not specific to Net::SSLeay. Read man pages for route and netstat.



> Thank You!



Thanking before there is anything to thank for is rude: you are making a presumption that someone

will help. Thank you is sincere only if given after good work.



--Sampo



> -- 

> Best regards!                          mailto:ssnnss at bk.ru

> 

> 



More information about the Net-ssleay-devel mailing list