× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello,

First, this message isn't related to FTPAPI, it's related to Sockets in
RPG in general, so RPG400-L is a better choice.

To other posters:  If you reply to Eduard's message, please do not reply
to FTPAPI, only reply to this list. Thanks!


> We have an RPG socketinterface server sitting waiting on connection
> requests on a certain port. Now we only want to accept connections from
> an certain IP Address.
> Doe someone know if and how this can be arranged??
>

You only want to accept connections FROM a particular IP address?  or do
you mean ON a particular IP address?

The bind() API can be used to control which IP address you listen on.  For
example, if the iSeries that your program runs on has a LAN IP address
and an Internet IP address, you can use bind() to tell it that you only
want to listen to the LAN's IP address.

Likewise, you could use bind() to tell it only to listen to 127.0.0.1,
which is very useful when you're writing programs that should only accept
requests from within the same system.


On the other hand, if you want to control which other computers are
allowed to connect to you (using their IP address as the determinant) then
you need to use a firewall.

Well, I suppose you could check the address that accept() returns in it's
second parameter to see who connected to you, and call close() if you
don't like it...

But if you did that, then someone could send thousands of connect attempts
to your port every second, potentially preventing your program from being
able to get any "real" work done.  A firewall would block this.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.