|
Scott, I quess that on the route the requests should take there is a firewall in between (Between the DMZ of the webserver and the Production iSeries where our interface is running). The problem however is that they can access our interface from within there production network and the interface just processes any well formatted request supplied with the correct User/Password. Now we have to enhance the interface to being able to verify if the request is from a wished originator. I will use the accept() parameter to verify that. Thanks, Eduard Sluis. Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> wrote: 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. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.