Wednesday, October 20, 2010

Vsftpd + tcp_wrappers host and user access control



RHEL4 in vsftpd support at compile time has tcp_wrappers, so you can use tcp_wrappers to achieve the host access control.

Before the experiment, first said the implementation of the next order of tcp-wrappers:

First implementation of the hosts.allow, if hosts.allow inside the list, the list of the machine is allowed access; otherwise, then scroll down to hosts.deny, if the hosts.deny list inside, then refused to list the machine access, if also not (that is, which do not allow and deny list) is allowed access to the host.

Real life, host.allow can also set "Reject" feature, so generally only use / etc / hosts.allow for access control can host.

(A) of the host access control

The host (192.168.1.102) to configure vsftpd service, so in addition to 192.168.1.100 192.168.1.0/24 network segment other than to allow other hosts to access the FTP service.

Program very simple, edit / etc / hosts.allow

vsftpd: 192.168.1.100: DENY

vsftpd: 192.168.1.

Restart vsftpd, experimental purposes can be achieved, we can tcp_wrappers in the experiment will do more complex experiments.

(B) User Access Control

vsftpd flexible user access control. In the specific implementation, vsftpd user access control is divided into two categories: the first is the traditional list of users / etc / vsftpd / ftpusers, I understand it as the system list (that is, the system prohibited); second is to improve the user list file / etc / vsftpd / user_list, I understand it as they want to ban list

To realize the second list control must be inside vsftpd.conf

userlist_enable = YES

userlist_deny = YES / / This article is the system default exists, that is also unnecessary to add the system defaults to YES

userlist_file = / etc / vsftpd / usrer_list

The above simple experiment can be achieved vsftpd powerful control.







Recommended links:



wholesale kingsun V602A wifi phone java bluetooth



The Fate of Sina and Sohu, Sina too poor to only ads



Barbed Words! Photoshop Special Effects Make The Word Cactus



OPTIMISTIC about the four reasons OPhone



Mito Xiu 1 minute to create non-mainstream days



Compilers And Interpreters Report



The Complete Production Process Of A CG - 2 Color (background Color)



FLV To PSP



Premier Web Servers



Charles Zhang Said Sohu Sogou Do Not Intend To Use The Input Method Earnings



OGM to MP4



e-cology in the Pan Micro Series 42



Shi Jian: create their own aviation nerve



OGM to MKV



REVIEW Animation Tools



Wednesday, October 6, 2010

DreamweaverMX build Guestbook (4)


Dreamweaver MX Ultradev exploration (7) to create our guest book (4)

What to do now is to increase the message of the page, new.asp. Our principle is to design a good database in the previous increase in data, here we do not go through, in Figure (7-36) below.



7-36

Remember to submit data that defines the index.asp page to Oh. In order to prevent it wrong, do we want to use a behavior, but this time do not use the server behaviors, and to use DW MX own behavior on the line. Select a form after form Design -> Behaviors -> Validate Form (Design -> Behavior -> validation form), Figure (7-37) below.



7-37

Remember to plan for the f_name and f_content that the required fields on the hook, f_oicq acceptable type to Number, f_email acceptable type to Email Address.

As edit.asp (edit page), rep.asp (back page) and del.asp (delete page) is simply to accept the values passed to it in front of our display the corresponding data, and then use Updata Recordt and Delete Record server behavior Here we do not go through, and results shown in Figure (7-38,7-39,7-40) below.



7-38

Here is edit.asp page, establishing the time and the previous record set the same, but remember to apply Move To Specific Record server behavior in order to find the corresponding set of records. The above table also produced the same problems and index.asp, but should show the user name, user messages and owners back into the text box and drag the text to the corresponding database field box, the last application Updata Recordt server behavior, and then update the data back to the definition index.asp page on the line. Another point to note here, we should put the form in the large form to be effective.



7-39

This is del.asp page, the same form to build Oh, but do not put names into a text box, because only delete data, it is important also Move To Specific Record server line, and Delete Record server behavior, and finally removed the definition of Go to index.asp page.



7-40

This is rep.asp page, the page and above edit.asp page or less the same behavior using the Updata Recordt server, but the difference is that it only updated the contents of a field, ibid want to use Move To Specific Record server behavior, the Head back into the text box, so that super users can input.

OK, just lack a little bit, and to try and try again ah! ! !

We are here to consider the question, how to have administrative rights on the super-user management message then? Which can edit, delete, reply, etc.. Here we should use landing, this is a no contact with our previous server acts Log In User server behavior. Similarly, it is very easy to learn. :)

Open the login.asp page, to create a form, forms, text boxes and text boxes that the above named f_name, that the following named f_password, and to its type (type) to password, Figure (7 - 41) below.



7-41

After doing all this use of Application -> User Authentication -> Log In User (Applications -> user authentication -> user login), Figure (7-42) below.



7-42




[Next]



After clicking on the Figure (7-43) as shown in the dialog box.



7-43

Get Input Form Form: In this drop-down list, select which to accept the submission form, we have only one form here, so we do not choose.
Username Field: Select the user name here, the corresponding text box. We have defined the user name text box named f_name, so here are options f_name.
Password Field: Select the user password here, the corresponding text box, ibid.
Validate Using Connection: here choose what you want to use a database connection.
Table: To use the database to which table. Here we take note of where we want to use the admin table, though in the past we have been using f_bbs table.
Username Column: select the user name field mapping, select the database where the f_name field.
Password Column: Select the user password on the mapping of the field, ibid.
If Login Succeeds, Go To: to which, if authenticated page, where we define Home index.asp.
If Login Fails, Go To: If there is no validation to which pages, where we define the return to the sorry.asp.
Restrict Access Based On: because we want to restrict access to some pages, such as edit and delete and so on, so use to this. In the following types of choices Username and Password, the user name and password.

Click OK to complete the settings on this page.

Now we head back to look at, and we edit, asp, del.asp, rep.asp are not allowed to share casual visit, where the page should be used to protect the server behavior. Application -> Server Behaviors -> User Authentication -> Restrict Access To Pags (Applications -> server behavior -> user authentication -> pages of data protection), Figure (7 - 45) below.



7-45

Click the Figure after (7-46) as shown in the dialog box.



7-46

Restrict Ased On: page protection type, here we have chosen username and password (user name and password).
If Access Denied, Go To: If the illegal access, go to which pages, where we choose to have illegal access to login.asp (landing page).

The need to protect the page has edit.asp, del.asp, rep, asp, each page of the settings are the same, remember to set the oh.

The final sorry.asp page is a simple page, shown in Figure (7-47) below. In this "here" with a connection to the login.asp page.



7-47

Finished! Oh, I said finally done. :)






Recommended links:



XviD To WMV



3G2 to MPEG



Acrord32.exe Error Quick Repair



DVR-MS To MP4